pidl: Fix function for py_<name>_ndr_print_(in|out)
authorAndreas Schneider <asn@samba.org>
Wed, 12 Dec 2018 19:53:00 +0000 (20:53 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 13 Dec 2018 00:49:30 +0000 (01:49 +0100)
The function takes two PyObject arguments, See:

https://docs.python.org/3/c-api/structures.html#c.PyCFunction

and

https://docs.python.org/2/c-api/structures.html#c.PyCFunction

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
pidl/lib/Parse/Pidl/Samba4/Python.pm

index f418ac489aeace76bb60e2a875b5660f6955ba0a..01dda41e63da0ac79283b417314e5ce2b421c3a7 100644 (file)
@@ -817,7 +817,7 @@ sub PythonFunctionStruct($$$$)
        $self->pidl("}");
        $self->pidl("");
 
-       $self->pidl("static PyObject *py_$name\_ndr_print_in(PyObject *py_obj)");
+       $self->pidl("static PyObject *py_$name\_ndr_print_in(PyObject *py_obj, PyObject *py_obj2)");
        $self->pidl("{");
        $self->indent;
        $self->pidl("return py_$name\_ndr_print(py_obj, \"$name\_in\", NDR_IN);");
@@ -825,7 +825,7 @@ sub PythonFunctionStruct($$$$)
        $self->pidl("}");
        $self->pidl("");
 
-       $self->pidl("static PyObject *py_$name\_ndr_print_out(PyObject *py_obj)");
+       $self->pidl("static PyObject *py_$name\_ndr_print_out(PyObject *py_obj, PyObject *py_obj2)");
        $self->pidl("{");
        $self->indent;
        $self->pidl("return py_$name\_ndr_print(py_obj, \"$name\_out\", NDR_OUT);");