From a9fb47b5d6b06d2a528c17803e64b980f1f38805 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 1 Dec 2010 00:05:05 +0100 Subject: pyparam: Use talloc.Object. --- source4/param/pyparam.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/param') 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; -- cgit