From 2bf8a7485cf0733c808bc97a399a1c73bb988414 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Oct 2009 20:47:09 +1100 Subject: 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. --- pidl/lib/Parse/Pidl/NDR.pm | 2 ++ pidl/lib/Parse/Pidl/Typelist.pm | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm index 48a4ccbc95..249b778389 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, 'int3264' => 5, diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm index 55041a9602..1d82dee833 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", "int3264" => "int32_t", @@ -222,7 +224,7 @@ sub enum_type_fn($) } elsif (has_property($enum->{PARENT}, "v1_enum")) { return "uint32"; } - return "uint16"; + return "uint1632"; } sub bitmap_type_fn($) -- cgit