From 9f2468af157a80de3b71b472ab8aa337b10c5f84 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 20 Aug 2008 14:41:38 +0200 Subject: pidl/NDR::Parser: pass typedefs through the ParseElement*Level() functions metze (This used to be commit e51c0cf62c91f79f703b17bcf37c4a6fa8107ae0) --- source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 8053e5004e..745777d012 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -561,6 +561,8 @@ sub ParseElementPushLevel $self->ParseSwitchPush($e, $l, $ndr, $var_name, $env); } elsif ($l->{TYPE} eq "DATA") { $self->ParseDataPush($e, $l, $ndr, $var_name, $primitives, $deferred); + } elsif ($l->{TYPE} eq "TYPEDEF") { + $typefamily{$e->{DATA}->{TYPE}}->{PUSH_FN_BODY}->($self, $e->{DATA}, $ndr, $var_name); } } @@ -1011,6 +1013,8 @@ sub ParseElementPullLevel $self->ParseSwitchPull($e, $l, $ndr, $var_name, $env); } elsif ($l->{TYPE} eq "DATA") { $self->ParseDataPull($e, $l, $ndr, $var_name, $primitives, $deferred); + } elsif ($l->{TYPE} eq "TYPEDEF") { + $typefamily{$e->{DATA}->{TYPE}}->{PULL_FN_BODY}->($self, $e->{DATA}, $ndr, $var_name); } } @@ -1887,7 +1891,11 @@ sub ParseTypedefPush($$$$) { my($self,$e,$ndr,$varname) = @_; - $typefamily{$e->{DATA}->{TYPE}}->{PUSH_FN_BODY}->($self, $e->{DATA}, $ndr, $varname); + my $env; + + $env->{$e->{NAME}} = $varname; + + $self->ParseElementPushLevel($e, $e->{LEVELS}[0], $ndr, $varname, $env, 1, 1); } ##################################################################### @@ -1896,7 +1904,11 @@ sub ParseTypedefPull($$$$) { my($self,$e,$ndr,$varname) = @_; - $typefamily{$e->{DATA}->{TYPE}}->{PULL_FN_BODY}->($self, $e->{DATA}, $ndr, $varname); + my $env; + + $env->{$e->{NAME}} = $varname; + + $self->ParseElementPullLevel($e, $e->{LEVELS}[0], $ndr, $varname, $env, 1, 1); } ##################################################################### -- cgit