svn commit: samba r4517 - in branches/SAMBA_4_0/source/build/pidl: .
tpot at samba.org
tpot at samba.org
Tue Jan 4 23:15:34 GMT 2005
Author: tpot
Date: 2005-01-04 23:15:33 +0000 (Tue, 04 Jan 2005)
New Revision: 4517
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4517
Log:
Revert previous commit about giving arrays of scalars their own subtree.
Generate code to display using proto_tree_add_bytes() instead.
Modified:
branches/SAMBA_4_0/source/build/pidl/eparser.pm
Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/eparser.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-04 20:26:50 UTC (rev 4516)
+++ branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-04 23:15:33 UTC (rev 4517)
@@ -173,35 +173,39 @@
if ($t->{DATA}->{TYPE} eq "STRUCT") {
for my $e (@{$t->{DATA}->{ELEMENTS}}) {
-
$e->{PARENT} = $t->{DATA};
-
if ($needed{"pull_$t->{NAME}"}) {
$needed{"pull_$e->{TYPE}"} = 1;
}
if (util::is_scalar_type($e->{TYPE})) {
-
+
if (defined($e->{ARRAY_LEN}) or
util::has_property($e, "size_is")) {
- $needed{"ett_$e->{NAME}"} = 1;
+ # Arrays of scalar types are FT_BYTES
+
+ $needed{"hf_$e->{NAME}_$e->{TYPE}_array"} = {
+ 'name' => field2name($e->{NAME}),
+ 'type' => $e->{TYPE},
+ 'ft' => "FT_BYTES",
+ 'base' => elementbase($e)
+ };
} else {
-
$needed{"hf_$e->{NAME}_$e->{TYPE}"} = {
'name' => field2name($e->{NAME}),
'type' => $e->{TYPE},
'ft' => type2ft($e->{TYPE}),
'base' => elementbase($e)
};
-
- $e->{PARENT} = $t->{DATA};
-
- if ($needed{"pull_$t->{NAME}"}) {
- $needed{"pull_$e->{TYPE}"} = 1;
- }
}
+
+ $e->{PARENT} = $t->{DATA};
+
+ if ($needed{"pull_$t->{NAME}"}) {
+ $needed{"pull_$e->{TYPE}"} = 1;
+ }
} else {
@@ -433,7 +437,7 @@
s/(ndr_pull_array([^\(_]*?)\(ndr, (NDR_[^,]*?), ([^\)].*?)\);)/ndr_pull_array$2( ndr, $3, tree, $4);/smg;
- s/(ndr_pull_array_([^\(]*?)\(ndr, (NDR_[^,]*?), (r->((in|out).)?([^,]*?)), (.*?)\);)/ndr_pull_array_$2( ndr, $3, get_subtree(tree, \"$7\", ndr, ett_$7), $4, $8);/smg;
+ s/(ndr_pull_array_([^\(]*?)\(ndr, (NDR_[^,]*?), (r->((in|out).)?([^,]*?)), (.*?)\);)/ndr_pull_array_$2( ndr, $3, tree, hf_$7_$2_array, $4, $8);/smg;
# Save ndr_pull_relative[12]() calls from being wrapped by the
# proceeding regexp.
More information about the samba-cvs
mailing list