summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-09-13 01:06:18 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-10-26 11:20:19 +0200
commit40175613519e7405a16e8f896dfdc2949430bc4b (patch)
tree84619ceaced88b405763eb9aea5fac5362e69630 /pidl
parent29e75e98763623742eacf53cc680774db49f8524 (diff)
downloadsamba-40175613519e7405a16e8f896dfdc2949430bc4b.tar.gz
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>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 762941ff6d8..0ae273344d7 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/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");