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

tridge at samba.org tridge at samba.org
Fri Jul 8 10:56:20 GMT 2005


Author: tridge
Date: 2005-07-08 10:56:20 +0000 (Fri, 08 Jul 2005)
New Revision: 8242

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

Log:
support bitmap constants from ejs calls

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


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/ejs.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/ejs.pm	2005-07-08 10:41:27 UTC (rev 8241)
+++ branches/SAMBA_4_0/source/build/pidl/ejs.pm	2005-07-08 10:56:20 UTC (rev 8242)
@@ -465,12 +465,13 @@
 	my $v = 0;
 	# put the enum elements in the constants array
 	foreach my $e (@{$d->{ELEMENTS}}) {
-		chomp $e;
-		if ($e =~ /^(.*)=\s*(.*)\s*$/) {
-			$e = $1;
+		my $el = $e;
+		chomp $el;
+		if ($el =~ /^(.*)=\s*(.*)\s*$/) {
+			$el = $1;
 			$v = $2;
 		}
-		$constants{$e} = $v;
+		$constants{$el} = $v;
 		$v++;
 	}
 	pidl fn_prefix($d);
@@ -489,6 +490,14 @@
 	my $d = shift;
 	my $type_fn = $d->{BASE_TYPE};
 	my($type_decl) = typelist::mapType($d->{BASE_TYPE});
+	# put the bitmap elements in the constants array
+	foreach my $e (@{$d->{ELEMENTS}}) {
+		if ($e =~ /^(\w*)\s*(.*)\s*$/) {
+			my $bname = $1;
+			my $v = $2;
+			$constants{$bname} = $v;
+		}
+	}
 	pidl fn_prefix($d);
 	pidl "NTSTATUS ejs_push_$name(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const $type_decl *r)\n{\n";
 	pidl "return ejs_push_$type_fn(ejs, v, name, r);\n";



More information about the samba-cvs mailing list