~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Modules/_ctypes/callbacks.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        Py_XDECREF(self->restype);
24
24
        if (self->pcl)
25
25
                FreeClosure(self->pcl);
26
 
        PyObject_Del(self);
 
26
        PyObject_GC_Del(self);
27
27
}
28
28
 
29
29
static int
66
66
        0,                                      /* tp_getattro */
67
67
        0,                                      /* tp_setattro */
68
68
        0,                                      /* tp_as_buffer */
69
 
        Py_TPFLAGS_DEFAULT,                     /* tp_flags */
 
69
        Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,                        /* tp_flags */
70
70
        "CThunkObject",                         /* tp_doc */
71
71
        CThunkObject_traverse,                  /* tp_traverse */
72
72
        CThunkObject_clear,                     /* tp_clear */
367
367
        CThunkObject *p;
368
368
        int i;
369
369
 
370
 
        p = PyObject_NewVar(CThunkObject, &CThunk_Type, nArgs);
 
370
        p = PyObject_GC_NewVar(CThunkObject, &CThunk_Type, nArgs);
371
371
        if (p == NULL) {
372
372
                PyErr_NoMemory();
373
373
                return NULL;
382
382
        
383
383
        for (i = 0; i < nArgs + 1; ++i)
384
384
                p->atypes[i] = NULL;
 
385
        PyObject_GC_Track((PyObject *)p);
385
386
        return p;
386
387
}
387
388