summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-06 20:47:09 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-07 09:56:22 +1100
commit2bf8a7485cf0733c808bc97a399a1c73bb988414 (patch)
treece07335e4304dfbe973b1da46ddeaecb19da53ac /pidl/lib/Parse
parenta4aa38f8b927d6713c4cdd921a0a27cded041e94 (diff)
downloadsamba-2bf8a7485cf0733c808bc97a399a1c73bb988414.tar.gz
samba-2bf8a7485cf0733c808bc97a399a1c73bb988414.tar.bz2
samba-2bf8a7485cf0733c808bc97a399a1c73bb988414.zip
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.
Diffstat (limited to 'pidl/lib/Parse')
-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 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($)