svn commit: samba r15324 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR: .

jelmer at samba.org jelmer at samba.org
Sat Apr 29 14:51:26 GMT 2006


Author: jelmer
Date: 2006-04-29 14:51:26 +0000 (Sat, 29 Apr 2006)
New Revision: 15324

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15324

Log:
Generate prototype even if the function itself is 
written manually.

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-04-29 14:01:49 UTC (rev 15323)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-04-29 14:51:26 UTC (rev 15324)
@@ -194,13 +194,13 @@
 
 #####################################################################
 # declare a function public or static, depending on its attributes
-sub fn_declare($$)
+sub fn_declare($$$)
 {
-	my ($fn,$decl) = @_;
+	my ($type,$fn,$decl) = @_;
 
-	if (has_property($fn, "public")) {
+	if (has_property($fn, "no$type") or has_property($fn, "public")) {
 		pidl_hdr "$decl;";
-		pidl "_PUBLIC_ $decl";
+		pidl "_PUBLIC_ $decl" unless (has_property($fn, "no$type"));
 	} else {
 		pidl "static $decl";
 	}
@@ -1814,7 +1814,7 @@
 	my($e) = shift;
 
 	my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"push");
-	fn_declare($e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)");
+	fn_declare("push", $e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)");
 
 	pidl "{";
 	indent;
@@ -1833,7 +1833,7 @@
 
 	my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"pull");
 
-	fn_declare($e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)");
+	fn_declare("pull", $e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)");
 
 	pidl "{";
 	indent;
@@ -1871,7 +1871,7 @@
 	my $tf = $typefamily{$t->{DATA}->{TYPE}};
 	my $args = $tf->{SIZE_FN_ARGS}->($t);
 
-	fn_declare($t, "size_t ndr_size_$t->{NAME}($args)");
+	fn_declare("size", $t, "size_t ndr_size_$t->{NAME}($args)");
 
 	pidl "{";
 	indent;
@@ -1952,10 +1952,10 @@
 { 
 	my($fn) = shift;
 
+	fn_declare("push", $fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)");
+
 	return if has_property($fn, "nopush");
 
-	fn_declare($fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)");
-
 	pidl "{";
 	indent;
 
@@ -2032,10 +2032,11 @@
 { 
 	my($fn) = shift;
 
+	# pull function args
+	fn_declare("pull", $fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)");
+
 	return if has_property($fn, "nopull");
 
-	# pull function args
-	fn_declare($fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)");
 	pidl "{";
 	indent;
 



More information about the samba-cvs mailing list