summaryrefslogtreecommitdiff
path: root/source4/build/pidl/ndr.pm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-04-29 18:31:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:21 -0500
commit6c74a0792ccde16e482a6ff8d7d935829c2b9914 (patch)
tree933f7b4adec9cc67e967213acd89291c89c78d53 /source4/build/pidl/ndr.pm
parenta53548d0741421b57b450d3ef62d3ac42c233030 (diff)
downloadsamba-6c74a0792ccde16e482a6ff8d7d935829c2b9914.tar.gz
samba-6c74a0792ccde16e482a6ff8d7d935829c2b9914.tar.bz2
samba-6c74a0792ccde16e482a6ff8d7d935829c2b9914.zip
r6516: use only one list of scalar types and make "string" just a simple scalar type (mostly)
metze (This used to be commit ba1686e31a0d70a1fddabf4289d20fa8fe13b566)
Diffstat (limited to 'source4/build/pidl/ndr.pm')
-rw-r--r--source4/build/pidl/ndr.pm35
1 files changed, 3 insertions, 32 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm
index 0804737747..3c75b29227 100644
--- a/source4/build/pidl/ndr.pm
+++ b/source4/build/pidl/ndr.pm
@@ -216,35 +216,6 @@ sub find_largest_alignment($)
return $align;
}
-my %scalar_alignments =
-(
- "char" => 1,
- "int8" => 1,
- "uint8" => 1,
- "short" => 2,
- "wchar_t" => 2,
- "int16" => 2,
- "uint16" => 2,
- "long" => 4,
- "int32" => 4,
- "uint32" => 4,
- "dlong" => 4,
- "udlong" => 4,
- "udlongr" => 4,
- "NTTIME" => 4,
- "NTTIME_1sec" => 4,
- "time_t" => 4,
- "DATA_BLOB" => 4,
- "error_status_t" => 4,
- "WERROR" => 4,
- "NTSTATUS" => 4,
- "boolean32" => 4,
- "unsigned32" => 4,
- "ipv4address" => 4,
- "hyper" => 8,
- "NTTIME_hyper" => 8
-);
-
#####################################################################
# align a type
sub align_type
@@ -266,10 +237,10 @@ sub align_type
} elsif (($dt->{TYPE} eq "STRUCT") or ($dt->{TYPE} eq "UNION")) {
return find_largest_alignment($dt);
} elsif ($dt->{TYPE} eq "SCALAR") {
- return $scalar_alignments{$dt->{NAME}};
- } else {
- die("Unknown data type type $dt->{TYPE}");
+ return typelist::getScalarAlignment($dt->{NAME});
}
+
+ die("Unknown data type type $dt->{TYPE}");
}
# determine if an element needs a reference pointer on the wire