summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/lib/Parse/Pidl/NDR.pm1
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm9
2 files changed, 10 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 3daad24c5d..5ee26d16b6 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -855,6 +855,7 @@ my %property_list = (
"endpoint" => ["INTERFACE"],
"pointer_default" => ["INTERFACE"],
"helper" => ["INTERFACE"],
+ "pyhelper" => ["INTERFACE"],
"authservice" => ["INTERFACE"],
"restricted" => ["INTERFACE"],
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 90dcba0780..2c64f06aa4 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -280,6 +280,11 @@ sub PythonStruct($$$$$$)
$self->indent;
$self->pidl("{ \"__ndr_pack__\", (PyCFunction)py_$name\_ndr_pack, METH_NOARGS, \"S.pack() -> blob\\nNDR pack\" },");
$self->pidl("{ \"__ndr_unpack__\", (PyCFunction)py_$name\_ndr_unpack, METH_VARARGS, \"S.unpack(blob) -> None\\nNDR unpack\" },");
+ $self->deindent;
+ $self->pidl("#ifdef ".uc("py_$name\_extra_methods"));
+ $self->pidl("\t" .uc("py_$name\_extra_methods"));
+ $self->pidl("#endif");
+ $self->indent;
$self->pidl("{ NULL, NULL, 0, NULL }");
$self->deindent;
$self->pidl("};");
@@ -624,6 +629,10 @@ sub Interface($$$)
$self->pidl_hdr("\n");
+ if (has_property($interface, "pyhelper")) {
+ $self->pidl("#include \"".unmake_str($interface->{PROPERTIES}->{pyhelper})."\"\n");
+ }
+
$self->Const($_) foreach (@{$interface->{CONSTS}});
foreach my $d (@{$interface->{TYPES}}) {