summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-12-01 00:05:05 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-01 01:48:25 +0100
commita9fb47b5d6b06d2a528c17803e64b980f1f38805 (patch)
treeea42a9d5a6e5d2caf77f0673f184c6dfa15ca134
parent1f0cc6f0816abc15a24a8aa5f97e09c069e29927 (diff)
downloadsamba-a9fb47b5d6b06d2a528c17803e64b980f1f38805.tar.gz
samba-a9fb47b5d6b06d2a528c17803e64b980f1f38805.tar.bz2
samba-a9fb47b5d6b06d2a528c17803e64b980f1f38805.zip
pyparam: Use talloc.Object.
-rw-r--r--source4/param/pyparam.c8
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;