r4858: a better fix for alignment of enumerated types (I'm not even sure why
authorAndrew Tridgell <tridge@samba.org>
Wed, 19 Jan 2005 21:38:27 +0000 (21:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:00 +0000 (13:09 -0500)
the last fix worked at all)

source/build/pidl/util.pm

index 39f84843cbd12b536d3be213d8324a7baa9ba8c6..48fd9469b8da2ba404def8ab5b8ee3de9a00a41b 100644 (file)
@@ -331,12 +331,12 @@ sub type_align($)
     if (need_wire_pointer($e)) {
            return 4;
     }
-    if (my $ret = $type_alignments{$type}) {
-           return $ret;
-    }
 
     if (is_enum($type)) {
-           my $ret = type_align(get_enum($type));
+           $type = enum_type_fn(get_enum($type));
+    }
+
+    if (my $ret = $type_alignments{$type}) {
            return $ret;
     }