diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/talloc/pytalloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index f4b7d10e97..8bc85eead6 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -25,13 +25,13 @@ void py_talloc_dealloc(PyObject* self) py_talloc_Object *obj = (py_talloc_Object *)self; talloc_free(obj->talloc_ctx); obj->talloc_ctx = NULL; - PyObject_Del(self); + self->ob_type->tp_free(self); } PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr) { - py_talloc_Object *ret = PyObject_New(py_talloc_Object, py_type); + py_talloc_Object *ret = (py_talloc_Object *)py_type->tp_alloc(py_type, 0); ret->talloc_ctx = talloc_new(NULL); if (ret->talloc_ctx == NULL) { return NULL; |