summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-11-30 22:59:32 +0100
committerJelmer Vernooij <jelmer@samba.org>2010-12-01 01:48:24 +0100
commitdd0fbc47c798acfb003e37afbee5f0748e30ad1b (patch)
tree6a4482918bcd6d37f685fc2aba8943d0329945c2 /pidl/lib/Parse/Pidl
parent0acc93cc2c8baa9a693066835ff1a1ba1e0ed50b (diff)
downloadsamba-dd0fbc47c798acfb003e37afbee5f0748e30ad1b.tar.gz
samba-dd0fbc47c798acfb003e37afbee5f0748e30ad1b.tar.bz2
samba-dd0fbc47c798acfb003e37afbee5f0748e30ad1b.zip
pidl: Base new objects off of talloc object.
Diffstat (limited to 'pidl/lib/Parse/Pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm8
1 files changed, 4 insertions, 4 deletions
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";
}