aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-24 21:50:25 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-25 04:51:19 +0000
commit1dd1a13e9f2a6c3ebd51c883bac5a8c2e1eeb4d3 (patch)
tree36bf1b5b3aa91eb4502a17dbfff65b4415500c67
parent484d114b361162325405d5437be3fe6f1342932f (diff)
pidl:Python: the py_{import,export}_*() functions can be static now.
Pick up change from Samba: commit 40175613519e7405a16e8f896dfdc2949430bc4b Author: Stefan Metzmacher <metze@samba.org> Date: Tue Sep 13 01:06:18 2016 +0200 pidl:Python: the py_{import,export}_*() functions can be static now. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Change-Id: I6e06c97b44a04cab36d134916eddf4c501ccc35d Reviewed-on: https://code.wireshark.org/review/23714 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--tools/pidl/lib/Parse/Pidl/Samba4/Python.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm b/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 762941f..0ae2733 100644
--- a/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/tools/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -676,8 +676,7 @@ sub PythonType($$$$)
my $docstring = $self->DocString($d, $d->{NAME});
my $cname = "union $d->{NAME}";
- $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("static PyObject *py_import_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, " .mapTypeName($d) . " *in)");
$self->pidl("{");
$self->indent;
$self->FromUnionToPythonFunction("mem_ctx", $actual_ctype, "level", "in") if ($actual_ctype->{TYPE} eq "UNION");
@@ -685,8 +684,7 @@ sub PythonType($$$$)
$self->pidl("}");
$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("static ".mapTypeName($d) . " *py_export_$d->{NAME}(TALLOC_CTX *mem_ctx, int level, PyObject *in)");
$self->pidl("{");
$self->indent;
$self->FromPythonToUnionFunction($actual_ctype, mapTypeName($d), "level", "mem_ctx", "in") if ($actual_ctype->{TYPE} eq "UNION");