diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-08-20 14:41:38 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-08-20 15:22:04 +0200 |
commit | 9f2468af157a80de3b71b472ab8aa337b10c5f84 (patch) | |
tree | 691764994d676ac52cb8497bd5edcf9ddf8eb444 | |
parent | 397b007df993852577897823e3a454756d385732 (diff) | |
download | samba-9f2468af157a80de3b71b472ab8aa337b10c5f84.tar.gz samba-9f2468af157a80de3b71b472ab8aa337b10c5f84.tar.bz2 samba-9f2468af157a80de3b71b472ab8aa337b10c5f84.zip |
pidl/NDR::Parser: pass typedefs through the ParseElement*Level() functions
metze
(This used to be commit e51c0cf62c91f79f703b17bcf37c4a6fa8107ae0)
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 16 |
1 files 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); } ##################################################################### |