diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-10-08 00:33:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:33 -0500 |
commit | 848dff8f0d9242c0c7a417a1482c14ac289deb6f (patch) | |
tree | 25019d0267b46b577aec10b4a7d2c8769e7239fb /source4/pidl/lib/Parse/Pidl/NDR.pm | |
parent | b1b6eb7b67542c656e1c087ba590c4269f867772 (diff) | |
download | samba-848dff8f0d9242c0c7a417a1482c14ac289deb6f.tar.gz samba-848dff8f0d9242c0c7a417a1482c14ac289deb6f.tar.bz2 samba-848dff8f0d9242c0c7a417a1482c14ac289deb6f.zip |
r10829: Documentation updates
Update TODO
Some small fixes to the modules
(This used to be commit 0c53e7c3cf7fd91fd34c48a5e68c1bcf70569854)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 64190e87b8..f975e07b15 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -5,6 +5,26 @@ # Copyright jelmer@samba.org 2004-2005 # released under the GNU GPL +=pod + +=head1 NAME + +Parse::Pidl::NDR - NDR parsing information generator + +=head1 DESCRIPTION + +##################################################################### +# return a table describing the order in which the parts of an element +# should be parsed +# Possible level types: +# - POINTER +# - ARRAY +# - SUBCONTEXT +# - SWITCH +# - DATA + +=cut + package Parse::Pidl::NDR; require Exporter; @@ -62,15 +82,6 @@ sub fatal($$) die("$pos->{FILE}:$pos->{LINE}:$s\n"); } -##################################################################### -# return a table describing the order in which the parts of an element -# should be parsed -# Possible level types: -# - POINTER -# - ARRAY -# - SUBCONTEXT -# - SWITCH -# - DATA sub GetElementLevelTable($) { my $e = shift; @@ -394,6 +405,7 @@ sub ParseUnion($) if (has_property($e, "nodiscriminant")) { $switch_type = undef; } + my $hasdefault = 0; foreach my $x (@{$e->{ELEMENTS}}) { my $t; @@ -404,6 +416,7 @@ sub ParseUnion($) } if (has_property($x, "default")) { $t->{CASE} = "default"; + $hasdefault = 1; } elsif (defined($x->{PROPERTIES}->{case})) { $t->{CASE} = "case $x->{PROPERTIES}->{case}"; } else { @@ -417,6 +430,7 @@ sub ParseUnion($) SWITCH_TYPE => $switch_type, ELEMENTS => \@elements, PROPERTIES => $e->{PROPERTIES}, + HAS_DEFAULT => $hasdefault, ORIGINAL => $e }; } |