summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-08-20 14:41:05 +0200
committerStefan Metzmacher <metze@samba.org>2008-08-20 15:22:03 +0200
commit397b007df993852577897823e3a454756d385732 (patch)
tree10f486d2ac5c434262707fcf11933cdcd4ae7c2b /source4/pidl/lib/Parse/Pidl
parent9941c1e7fc7385ad72e3786ca266924d392326e3 (diff)
downloadsamba-397b007df993852577897823e3a454756d385732.tar.gz
samba-397b007df993852577897823e3a454756d385732.tar.bz2
samba-397b007df993852577897823e3a454756d385732.zip
pidl/NDR: generate a LEVELS array for typedefs
metze (This used to be commit 6785684db3446c03d8061c8bb3d94889b443d7d5)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index 25743f512f..10bd29715b 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -287,6 +287,22 @@ sub GetElementLevelTable($$)
return $order;
}
+sub GetTypedefLevelTable($$$)
+{
+ my ($e, $data, $pointer_default) = @_;
+
+ my $order = [];
+
+ push (@$order, {
+ TYPE => "TYPEDEF"
+ });
+
+ my $i = 0;
+ foreach (@$order) { $_->{LEVEL_INDEX} = $i; $i+=1; }
+
+ return $order;
+}
+
#####################################################################
# see if a type contains any deferred data
sub can_contain_deferred($)
@@ -575,6 +591,7 @@ sub ParseTypedef($$)
NAME => $d->{NAME},
TYPE => $d->{TYPE},
PROPERTIES => $d->{PROPERTIES},
+ LEVELS => GetTypedefLevelTable($d, $data, $pointer_default),
DATA => $data,
ORIGINAL => $d
};