summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-12 19:01:40 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-12 19:01:40 +0100
commit0727fbe87d0016a3b18dbdfedcd417126e1aa514 (patch)
treed11ccc7e1c83b612823b406de34d59bbcfcf34cd /pidl/lib/Parse/Pidl/Samba4
parent3e2c070395d2fef232ab60d075194091f7b46b35 (diff)
downloadsamba-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/Pidl/Samba4')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm3
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("}");