diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-12 19:01:40 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-12 19:01:40 +0100 |
commit | 0727fbe87d0016a3b18dbdfedcd417126e1aa514 (patch) | |
tree | d11ccc7e1c83b612823b406de34d59bbcfcf34cd /pidl/lib/Parse | |
parent | 3e2c070395d2fef232ab60d075194091f7b46b35 (diff) | |
download | samba-0727fbe87d0016a3b18dbdfedcd417126e1aa514.tar.gz samba-0727fbe87d0016a3b18dbdfedcd417126e1aa514.tar.bz2 samba-0727fbe87d0016a3b18dbdfedcd417126e1aa514.zip |
Don't allow specifying arguments to pidl object constructors, as they'll
be ignored anyway atm.
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 2664275934..4c598b3ca0 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -224,7 +224,10 @@ sub PythonStruct($$$$$$) $self->pidl("static PyObject *py_$name\_new(PyTypeObject *self, 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->deindent; $self->pidl("}"); |