diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-04 23:25:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:17 -0500 |
commit | 3acf026603944b2de6e55e1d3068f6c9cdde9429 (patch) | |
tree | 2bfcfb01cb8e1749d31b305dd3a604b2a26495f5 /source4/build/pidl/header.pm | |
parent | 328e260ca9378e83e253f5622ca84ea36b3ebf3a (diff) | |
download | samba-3acf026603944b2de6e55e1d3068f6c9cdde9429.tar.gz samba-3acf026603944b2de6e55e1d3068f6c9cdde9429.tar.bz2 samba-3acf026603944b2de6e55e1d3068f6c9cdde9429.zip |
r4518: added proper support for "typedef enum" in pidl. We can now use enums as types in switch
statements and variable types, and the value will be printed with its string name and value
(This used to be commit 1852033f2ec7584657d586e44d25a280959e4d81)
Diffstat (limited to 'source4/build/pidl/header.pm')
-rw-r--r-- | source4/build/pidl/header.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm index 21565a0f37..ccb302be89 100644 --- a/source4/build/pidl/header.pm +++ b/source4/build/pidl/header.pm @@ -97,6 +97,9 @@ sub HeaderEnum($$) { my($enum) = shift; my($name) = shift; + + util::register_enum($name); + $res .= "\nenum $name {\n"; $tab_depth++; my $els = \@{$enum->{ELEMENTS}}; @@ -160,6 +163,8 @@ sub HeaderType($$$) } if ($data =~ "string") { $res .= "const char *"; + } elsif (util::is_enum($e->{TYPE})) { + $res .= "enum $data"; } elsif (util::is_scalar_type($data)) { $res .= "$data"; } elsif (util::has_property($e, "switch_is")) { |