From 2f438b4cdeaacf55b0832bf71b2ef15b30cdd758 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 11 Nov 2008 17:10:24 +0100 Subject: Remove unused variable, fix return. --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 38aee2c9d1..a3107d4672 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -702,7 +702,7 @@ sub Interface($$$) $self->pidl("if (!NT_STATUS_IS_OK(status)) {"); $self->indent; $self->pidl("PyErr_SetNTSTATUS(status);"); - $self->pidl("return;"); + $self->pidl("return NULL;"); $self->deindent; $self->pidl("}"); @@ -1181,7 +1181,6 @@ sub Parse($$$$$) $self->pidl("{"); $self->indent; $self->pidl("PyObject *m;"); - $self->pidl("NTSTATUS status;"); $self->pidl(""); foreach (@{$self->{ready_types}}) { -- cgit From cf06b75f0a0e7d0513ab1128a4d189c74097216f Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 14 Nov 2008 22:15:30 +0100 Subject: pidl: do not generate cli_ functions for noopnum flaged functions. Guenther --- pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm index 2a23fad4a7..4109ce9962 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm @@ -215,7 +215,10 @@ sub ParseInterface($$) $self->pidl_hdr("#ifndef __CLI_$uif\__"); $self->pidl_hdr("#define __CLI_$uif\__"); - $self->ParseFunction($if->{NAME}, $_) foreach (@{$if->{FUNCTIONS}}); + foreach (@{$if->{FUNCTIONS}}) { + next if ($_->{PROPERTIES}{noopnum}); + $self->ParseFunction($if->{NAME}, $_); + } $self->pidl_hdr("#endif /* __CLI_$uif\__ */"); } -- cgit From 216c788b0cef379cf0e3edff7b28819ffe06a740 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 14 Nov 2008 23:28:07 +0100 Subject: pidl: skip generation of noopnum functions in generated s3 server. Guenther --- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index 6034fb6f16..e5d8f1c1d2 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -205,7 +205,11 @@ sub ParseInterface($) pidl_hdr "#ifndef __SRV_$uif\__"; pidl_hdr "#define __SRV_$uif\__"; - ParseFunction($if, $_) foreach (@{$if->{FUNCTIONS}}); + + foreach (@{$if->{FUNCTIONS}}) { + next if ($_->{PROPERTIES}{noopnum}); + ParseFunction($if, $_); + } pidl ""; pidl "/* Tables */"; @@ -214,6 +218,7 @@ sub ParseInterface($) indent; foreach (@{$if->{FUNCTIONS}}) { + next if ($_->{PROPERTIES}{noopnum}); pidl "{\"" . uc($_->{NAME}) . "\", NDR_" . uc($_->{NAME}) . ", api_$_->{NAME}},"; } -- cgit From 2865be8a1c1d928ad86453e6dbf1c2a3508ad127 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 19 Nov 2008 12:38:38 +0100 Subject: pidl: fix generated s3-server in,out,ref qualifiers that are used for buffer allocation. Guenther --- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index e5d8f1c1d2..eb3cdf20cb 100644 --- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm @@ -142,6 +142,13 @@ sub ParseFunction($$) my @dir = @{$_->{DIRECTION}}; if (grep(/in/, @dir) and grep(/out/, @dir)) { pidl "r->out.$_->{NAME} = r->in.$_->{NAME};"; + } + } + + foreach (@{$fn->{ELEMENTS}}) { + my @dir = @{$_->{DIRECTION}}; + if (grep(/in/, @dir) and grep(/out/, @dir)) { + # noop } elsif (grep(/out/, @dir) and not has_property($_, "represent_as")) { AllocOutVar($_, "r", "r->out.$_->{NAME}", $env); -- cgit