summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-03-25 17:38:12 +0100
committerMichael Adam <obnox@samba.org>2015-03-25 20:45:01 +0100
commitb14a6d358031a34575b783ee6213597b05f5abaf (patch)
treef5c5c5979f5cd4400b1fc7486eb624ee61a9a7f8 /pidl
parent8c4d4f9e627256bb8c93615b600acfb438cdef55 (diff)
downloadsamba-b14a6d358031a34575b783ee6213597b05f5abaf.tar.gz
pidl/python: add prototypes into header section of generated c-files.
This stops emmiting hundreds of warnings when compiling with -Wmissing-prototypes. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Mar 25 20:45:01 CET 2015 on sn-devel-104
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 91201bbd1f1..b634137cd5d 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -645,6 +645,7 @@ sub PythonType($$$$)
if ($actual_ctype->{TYPE} eq "UNION" and defined($actual_ctype->{ELEMENTS})) {
$self->pidl("PyObject *py_import_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, " .mapTypeName($d) . " *in)");
+ $self->pidl_hdr("PyObject *py_import_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, " .mapTypeName($d) . " *in);\n");
$self->pidl("{");
$self->indent;
$self->FromUnionToPythonFunction("mem_ctx", $actual_ctype, "level", "in") if ($actual_ctype->{TYPE} eq "UNION");
@@ -653,6 +654,7 @@ sub PythonType($$$$)
$self->pidl("");
$self->pidl(mapTypeName($d) . " *py_export_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, PyObject *in)");
+ $self->pidl_hdr(mapTypeName($d) . " *py_export_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, PyObject *in);\n");
$self->pidl("{");
$self->indent;
$self->FromPythonToUnionFunction($actual_ctype, mapTypeName($d), "level", "mem_ctx", "in") if ($actual_ctype->{TYPE} eq "UNION");