summaryrefslogtreecommitdiffstats
path: root/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 18:46:59 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 18:46:59 +0100
commit38a4749d2cf9266164527e2b3c14bc7e47b72326 (patch)
tree292e84429e0513f739c2ee95b17d512d99ee3363 /pidl
parentf2b4aa82e0febd6528eb8231ac14d845b8aa80d0 (diff)
downloadsamba-38a4749d2cf9266164527e2b3c14bc7e47b72326.tar.gz
samba-38a4749d2cf9266164527e2b3c14bc7e47b72326.tar.xz
samba-38a4749d2cf9266164527e2b3c14bc7e47b72326.zip
Allow providing extra module-level Python functions.
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 120a35a1cf4..69365416a5e 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -1183,6 +1183,12 @@ sub Parse($$$$$)
my ($fn_name, $pyfn_name, $flags, $doc) = @$_;
$self->pidl("{ \"$fn_name\", (PyCFunction)$pyfn_name, $flags, $doc },");
}
+
+ $self->deindent;
+ $self->pidl("#ifdef ".uc("py_mod_$basename\_extra_methods"));
+ $self->pidl("\t" .uc("py_mod_$basename\_extra_methods"));
+ $self->pidl("#endif");
+ $self->indent;
$self->pidl("{ NULL, NULL, 0, NULL }");
$self->deindent;