git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e2c070
)
Don't allow specifying arguments to pidl object constructors, as they'll
author
Jelmer Vernooij
<jelmer@samba.org>
Fri, 12 Dec 2008 18:01:40 +0000
(19:01 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Fri, 12 Dec 2008 18:01:40 +0000
(19:01 +0100)
be ignored anyway atm.
pidl/lib/Parse/Pidl/Samba4/Python.pm
patch
|
blob
|
history
diff --git
a/pidl/lib/Parse/Pidl/Samba4/Python.pm
b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 26642759349d6616665dc67d2df727df5d199e8a..4c598b3ca0da5f45bbcb414cd5e6f4bd0a35401a 100644
(file)
--- 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("}");