From dd0fbc47c798acfb003e37afbee5f0748e30ad1b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 30 Nov 2010 22:59:32 +0100 Subject: pidl: Base new objects off of talloc object. --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 00ada47d95..b0b8e53f44 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -321,22 +321,22 @@ sub PythonStruct($$$$$$) $self->indent; $self->pidl("PyObject_HEAD_INIT(NULL) 0,"); $self->pidl(".tp_name = \"$modulename.$prettyname\","); - $self->pidl(".tp_basicsize = sizeof(py_talloc_Object),"); - $self->pidl(".tp_dealloc = py_talloc_dealloc,"); $self->pidl(".tp_getset = $getsetters,"); - $self->pidl(".tp_repr = py_talloc_default_repr,"); - $self->pidl(".tp_compare = py_talloc_default_cmp,"); if ($docstring) { $self->pidl(".tp_doc = $docstring,"); } $self->pidl(".tp_methods = $py_methods,"); $self->pidl(".tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,"); + $self->pidl(".tp_basicsize = sizeof(py_talloc_Object),"); $self->pidl(".tp_new = py_$name\_new,"); $self->deindent; $self->pidl("};"); $self->pidl(""); + my $talloc_typename = $self->import_type_variable("talloc", "Object"); + $self->register_module_prereadycode(["$name\_Type.tp_base = $talloc_typename;", ""]); + return "&$typeobject"; } -- cgit