summaryrefslogtreecommitdiff
path: root/source4/build/pidl/util.pm
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-19 22:11:17 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-19 22:11:17 +0000
commit5d4bfbd30d73274684bfb91c9c40df156244b267 (patch)
treeddefe52f3fa65bf02687d381fffa945068820fb1 /source4/build/pidl/util.pm
parent10ee36bede1337d73feec575cc840957090b30b2 (diff)
downloadsamba-5d4bfbd30d73274684bfb91c9c40df156244b267.tar.gz
samba-5d4bfbd30d73274684bfb91c9c40df156244b267.tar.bz2
samba-5d4bfbd30d73274684bfb91c9c40df156244b267.zip
switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants added recursive structure alignment. This gets quite hairy, but I think I've got it mostly right. (This used to be commit c0d96f87ea633b1372a383f705aaf4ed3099b4a7)
Diffstat (limited to 'source4/build/pidl/util.pm')
-rw-r--r--source4/build/pidl/util.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 244a78af09..c18fe031f9 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -198,8 +198,7 @@ sub type_align($)
my($e) = shift;
my $type = $e->{TYPE};
- if ($e->{POINTERS} || array_size($e)) {
- # FIXME: we really should recurse here
+ if (need_wire_pointer($e)) {
return 4;
}
@@ -214,6 +213,7 @@ sub type_align($)
return 2, if ($type eq "wchar_t");
return 4, if ($type eq "DATA_BLOB");
+ # it must be an external type - all we can do is guess
return 4;
}