diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/param/pyparam.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index be29c724f1..4e4d0410a5 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -362,7 +362,6 @@ static PyMappingMethods py_lp_ctx_mapping = { PyTypeObject PyLoadparmContext = { .tp_name = "LoadParm", .tp_basicsize = sizeof(py_talloc_Object), - .tp_dealloc = py_talloc_dealloc, .tp_getset = py_lp_ctx_getset, .tp_methods = py_lp_ctx_methods, .tp_new = py_lp_ctx_new, @@ -409,7 +408,6 @@ static PyMethodDef py_lp_service_methods[] = { PyTypeObject PyLoadparmService = { .tp_name = "LoadparmService", - .tp_dealloc = py_talloc_dealloc, .tp_basicsize = sizeof(py_talloc_Object), .tp_methods = py_lp_service_methods, .tp_flags = Py_TPFLAGS_DEFAULT, @@ -429,6 +427,12 @@ static PyMethodDef pyparam_methods[] = { void initparam(void) { PyObject *m; + PyTypeObject *talloc_type = PyTalloc_GetObjectType(); + if (talloc_type == NULL) + return; + + PyLoadparmContext.tp_base = talloc_type; + PyLoadparmService.tp_base = talloc_type; if (PyType_Ready(&PyLoadparmContext) < 0) return; |