summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-06 20:47:09 +1100
committerKarolin Seeger <kseeger@samba.org>2009-11-26 11:40:06 +0100
commit3031c5ff8348d6973077fc09f36d785eb72c4abf (patch)
treea37c055ae92a023ab1c5751c9601576185bf0863 /pidl
parentcfc55cace077ec3f97fcb6093c94a75dd84d07f2 (diff)
downloadsamba-3031c5ff8348d6973077fc09f36d785eb72c4abf.tar.gz
pidl: get the alignment right for uint1632 enums (NDR64)
The default enum in NDR63 is 32 bits, not 16 bits. We need a uint1632 type to get the alignment right. (cherry picked from commit 2bf8a7485cf0733c808bc97a399a1c73bb988414) (cherry picked from commit 0724f58489edb9fa25bcc593cbd5483450b5937f)
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/NDR.pm2
-rw-r--r--pidl/lib/Parse/Pidl/Typelist.pm4
2 files changed, 5 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 4f2578e72e4..fbd54693bca 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -50,6 +50,8 @@ my $scalar_alignment = {
'uint8' => 1,
'int16' => 2,
'uint16' => 2,
+ 'int1632' => 3,
+ 'uint1632' => 3,
'int32' => 4,
'uint32' => 4,
'hyper' => 8,
diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm
index 12ffa92bf6f..ca5ea0cfd2c 100644
--- a/pidl/lib/Parse/Pidl/Typelist.pm
+++ b/pidl/lib/Parse/Pidl/Typelist.pm
@@ -32,6 +32,8 @@ my %scalars = (
"uint8" => "uint8_t",
"int16" => "int16_t",
"uint16" => "uint16_t",
+ "int1632" => "int16_t",
+ "uint1632" => "uint16_t",
"int32" => "int32_t",
"uint32" => "uint32_t",
"hyper" => "uint64_t",
@@ -220,7 +222,7 @@ sub enum_type_fn($)
} elsif (has_property($enum->{PARENT}, "v1_enum")) {
return "uint32";
}
- return "uint16";
+ return "uint1632";
}
sub bitmap_type_fn($)