svn commit: samba r7605 - in branches/SAMBA_4_0/source/build/pidl: .

jelmer at samba.org jelmer at samba.org
Wed Jun 15 10:44:56 GMT 2005


Author: jelmer
Date: 2005-06-15 10:44:56 +0000 (Wed, 15 Jun 2005)
New Revision: 7605

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

Log:
Display properties in header files again.

Modified:
   branches/SAMBA_4_0/source/build/pidl/ndr_header.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/ndr_header.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/ndr_header.pm	2005-06-15 10:11:33 UTC (rev 7604)
+++ branches/SAMBA_4_0/source/build/pidl/ndr_header.pm	2005-06-15 10:44:56 UTC (rev 7605)
@@ -31,12 +31,10 @@
     my($props,$ignores) = @_;
 	my $ret = "";
 
-	return; 
-
     foreach my $d (keys %{$props}) {
-		next if ($ignores->{$d});
+		next if (grep(/^$d$/, @$ignores));
 		if($props->{$d} ne "1") {
-			$ret.= "$d(" . $props->{$d} . "),";
+			$ret.= "$d($props->{$d}),";
 		} else {
 			$ret.="$d,";
 		}
@@ -53,9 +51,6 @@
 {
 	my($element) = shift;
 
-	if (defined $element->{PROPERTIES}) {
-		HeaderProperties($element->{PROPERTIES}, {"in" => 1, "out" => 1});
-	}
 	pidl tabs();
 	HeaderType($element, $element->{TYPE}, "");
 	pidl " ";
@@ -68,7 +63,7 @@
 			$nl = Ndr::GetNextLevel($element, $nl) if ($nl->{TYPE} eq "SUBCONTEXT");
 			next if ($nl->{TYPE} eq "DATA" and typelist::scalar_is_reference($nl->{DATA_TYPE}));
 			$prefix .= "*";
-		} elsif (($l->{TYPE} eq "ARRAY")) {
+		} elsif ($l->{TYPE} eq "ARRAY") {
 			my $pl = Ndr::GetPrevLevel($element, $l);
 			next if ($pl and $pl->{TYPE} eq "POINTER");
 
@@ -85,7 +80,11 @@
 	if (defined $element->{ARRAY_LEN}[0] && util::is_constant($element->{ARRAY_LEN}[0])) {
 		pidl "[$element->{ARRAY_LEN}[0]]";
 	}
-	pidl ";\n";
+	pidl ";";
+	if (defined $element->{PROPERTIES}) {
+		HeaderProperties($element->{PROPERTIES}, ["in", "out"]);
+	}
+	pidl "\n";
 }
 
 #####################################################################
@@ -108,6 +107,9 @@
     }
     $tab_depth--;
     pidl "}";
+	if (defined $struct->{PROPERTIES}) {
+		HeaderProperties($struct->{PROPERTIES}, []);
+	}
 }
 
 #####################################################################
@@ -180,9 +182,6 @@
 	my($union,$name) = @_;
 	my %done = ();
 
-	if (defined $union->{PROPERTIES}) {
-		HeaderProperties($union->{PROPERTIES}, {});
-	}
 	pidl "\nunion $name {\n";
 	$tab_depth++;
 	foreach my $e (@{$union->{ELEMENTS}}) {
@@ -195,6 +194,10 @@
 	}
 	$tab_depth--;
 	pidl "}";
+
+	if (defined $union->{PROPERTIES}) {
+		HeaderProperties($union->{PROPERTIES}, []);
+	}
 }
 
 #####################################################################
@@ -456,9 +459,7 @@
 	$res = "";
     pidl "/* header auto-generated by pidl */\n\n";
     foreach my $x (@{$idl}) {
-	    if ($x->{TYPE} eq "INTERFACE") {
-		    HeaderInterface($x);
-	    }
+	    ($x->{TYPE} eq "INTERFACE") && HeaderInterface($x);
     }
     return $res;
 }



More information about the samba-cvs mailing list