summaryrefslogtreecommitdiff
path: root/source4/build/pidl/eparser.pm
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-01-20 05:57:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:01 -0500
commit0a05bdb9eb096e4426d06b8663ad295f6a693af2 (patch)
tree322cd245ac406006e827a96b5e124277e07afa36 /source4/build/pidl/eparser.pm
parentb808d49cd5e72c5c3560a334fdfefe40f3da721f (diff)
downloadsamba-0a05bdb9eb096e4426d06b8663ad295f6a693af2.tar.gz
samba-0a05bdb9eb096e4426d06b8663ad295f6a693af2.tar.bz2
samba-0a05bdb9eb096e4426d06b8663ad295f6a693af2.zip
r4865: Fix up subtree name when dissecting unions. E.g in LSA, The subtree
used to be called something like "Level, R->out.info" but now is called "Lsa PolicyInformation". (This used to be commit be2bb36856bee1c2882e063beb7c04ac5e5889de)
Diffstat (limited to 'source4/build/pidl/eparser.pm')
-rw-r--r--source4/build/pidl/eparser.pm30
1 files changed, 23 insertions, 7 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm
index 4f65d5ac17..a4279cce53 100644
--- a/source4/build/pidl/eparser.pm
+++ b/source4/build/pidl/eparser.pm
@@ -584,17 +584,33 @@ sub RewriteC($$$)
\);)
/ndr_pull_$2(ndr, tree, hf_$4, $3);/smgx;
- # Add subtree argument to calls dissecting structures, e.g
+ # Add subtree argument to calls dissecting structures/unions, e.g
#
# ndr_pull_string(ndr, NDR_SCALARS|NDR_BUFFERS, &r->command);
# ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr);
- s/(ndr_pull_([^\)]*?)\(
- ndr,\
- (NDR_[^,]*?),\
- (&?r->(in|out|)\.?([^\(].*?))\);)
- /ndr_pull_$2(ndr, $3, get_subtree(tree, \"$6\", ndr, ett_$2), $4);
- /smgx;
+ # Three argument version is for structures
+
+ if (/ndr_pull([^\)]*?)\(ndr, (NDR_[^,]*?), ([^,]*?)\);/) {
+
+ s/(ndr_pull_([^\)]*?)\(
+ ndr,\
+ (NDR_[^,]*?),\
+ (&?r->(in|out|)\.?([^\(].*?))\);)
+ /ndr_pull_$2(ndr, $3, get_subtree(tree, \"$6\", ndr, ett_$2), $4);
+ /smgx;
+ }
+
+ # Four argument version if for unions
+
+ if (/ndr_pull([^\)]*?)\(ndr, (NDR_[SB][^,]*?), ([^,]*?), ([^,]*?)\);/) {
+ s/(ndr_pull_([^\)]*?)\(
+ ndr,\
+ (NDR_[^,]*?),\
+ (&?r->(in|out|)\.?([^\(].*?))\);)
+ /ndr_pull_$2(ndr, $3, get_subtree(tree, \"$2\", ndr, ett_$2), $4);
+ /smgx;
+ }
# Add proto_tree parameter to pull function prototypes, e.g
#