From fe8e412f8d1e158dd810e8a726e6ffefda2914e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Jul 2005 10:56:20 +0000 Subject: r8242: support bitmap constants from ejs calls (This used to be commit 0cf8c091a9f1e389eb2be036311d9e73d13e336d) --- source4/build/pidl/ejs.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/ejs.pm b/source4/build/pidl/ejs.pm index 750c53e95f..08e577f875 100644 --- a/source4/build/pidl/ejs.pm +++ b/source4/build/pidl/ejs.pm @@ -465,12 +465,13 @@ sub EjsEnumPush($$) 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 @@ sub EjsBitmapPush($$) 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"; -- cgit