diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-21 00:09:30 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-21 00:09:30 +0100 |
commit | 42b7762f9b69b543038ad1bb754e3d9a813704db (patch) | |
tree | e83582a92d6c43d2cec4ee13897c27c175b80a05 /pidl | |
parent | ec80992ef5b54c443e41ebb91e793384907e68ba (diff) | |
download | samba-42b7762f9b69b543038ad1bb754e3d9a813704db.tar.gz samba-42b7762f9b69b543038ad1bb754e3d9a813704db.tar.bz2 samba-42b7762f9b69b543038ad1bb754e3d9a813704db.zip |
Support custom constructors for pidl-created types and support types based on pidl-created types.
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 4c598b3ca0..15dbd67b7c 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -221,14 +221,11 @@ sub PythonStruct($$$$$$) $self->pidl(""); } - $self->pidl("static PyObject *py_$name\_new(PyTypeObject *self, PyObject *args, PyObject *kwargs)"); + $self->pidl("static PyObject *py_$name\_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)"); $self->pidl("{"); $self->indent; - $self->pidl("char *kwlist[] = {NULL};"); $self->pidl("$cname *ret = talloc_zero(NULL, $cname);"); - $self->pidl("if (!PyArg_ParseTupleAndKeywords(args, kwargs, \"\", kwlist))"); - $self->pidl("\treturn NULL;"); - $self->pidl("return py_talloc_import(&$name\_Type, ret);"); + $self->pidl("return py_talloc_import(type, ret);"); $self->deindent; $self->pidl("}"); $self->pidl(""); |