diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-19 11:58:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:00 -0500 |
commit | 4db56efa19b9d93636d31ffde06ab7cdededda0c (patch) | |
tree | 934e1b566341abcfba95ff4f03666f67fc51d2bc /source4/build | |
parent | c2320ee11c56d715a782d5af0114ae614979ae86 (diff) | |
download | samba-4db56efa19b9d93636d31ffde06ab7cdededda0c.tar.gz samba-4db56efa19b9d93636d31ffde06ab7cdededda0c.tar.bz2 samba-4db56efa19b9d93636d31ffde06ab7cdededda0c.zip |
r4843: fixed the alignment handling of enumerated types
(This used to be commit d2946dfabbc727633cdb17c3956fc120e214140c)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/parser.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/util.pm | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index 077fcd4385..ac45b4d9bc 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -192,6 +192,8 @@ sub struct_alignment if (defined $structs{$e->{TYPE}}->{DATA}) { $a = union_alignment($structs{$e->{TYPE}}->{DATA}); } + } elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "ENUM") { + $a = util::type_align($e); } } else { $a = util::type_align($e); diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index bd87cf4317..39f84843cb 100644 --- a/source4/build/pidl/util.pm +++ b/source4/build/pidl/util.pm @@ -335,6 +335,11 @@ sub type_align($) return $ret; } + if (is_enum($type)) { + my $ret = type_align(get_enum($type)); + return $ret; + } + # it must be an external type - all we can do is guess return 4; } |