[PATCH] add missing prototypes to generated python code
Guenther Deschner
gd at samba.org
Wed Mar 25 10:47:14 MDT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
please review and push if appropriate.
Thanks,
Guenther
- --
Günther Deschner GPG-ID: 8EE11688
Red Hat gdeschner at redhat.com
Samba Team gd at samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlUS5okACgkQSOk3aI7hFogvYQCfXQpQwIJ9dIlOVyP6FHrec1+/
2VoAn1gjr6xLSyFN1cjwMhgWV/mXCmeb
=C4Yt
-----END PGP SIGNATURE-----
-------------- next part --------------
From 4a0ab10d68fd3f8990ee1a692f6139dc3cb8893d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Wed, 25 Mar 2015 17:38:12 +0100
Subject: [PATCH] pidl/python: add prototypes into header section of generated
c-files.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This stops emmiting hundreds of warnings when compiling with
-Wmissing-prototypes.
Guenther
Signed-off-by: Günther Deschner <gd at samba.org>
---
pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 91201bb..b634137 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");
--
2.1.0
More information about the samba-technical
mailing list