diff options
author | Tim Potter <tpot@samba.org> | 2005-01-07 23:23:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:32 -0500 |
commit | 60a849af6d37dccc3d1576442294e7a6f22d3a33 (patch) | |
tree | 82f26e6b2c53e592a2286561e54e50f17e53ae5a /source4/build | |
parent | 0ee9f4d6e16d2760f31cc8c0a2f120131da24fd3 (diff) | |
download | samba-60a849af6d37dccc3d1576442294e7a6f22d3a33.tar.gz samba-60a849af6d37dccc3d1576442294e7a6f22d3a33.tar.bz2 samba-60a849af6d37dccc3d1576442294e7a6f22d3a33.zip |
r4600: Remove Data::Dumper import leftover from debugging.
Return more ethereal types and bases for hf fields. Currently we
assume that enums always fit into a uint16 which will probably have to
change soon.
(This used to be commit 25f6e11f3156e21c1dc03afa879e9cda2f5dd341)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/eparser.pm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm index 73f2275b98..e25a1760e1 100644 --- a/source4/build/pidl/eparser.pm +++ b/source4/build/pidl/eparser.pm @@ -107,10 +107,13 @@ sub type2ft($) { my($t) = shift; - return "FT_UINT32", if ($t eq "uint32"); - return "FT_UINT16", if ($t eq "uint16"); - return "FT_UINT8", if ($t eq "uint8"); - return "FT_BYTES"; + return "FT_UINT$1" if $t =~ /uint(8|16|32|64)/; + return "FT_INT$1" if $t =~ /int(8|16|32|64)/; + return "FT_UINT64", if ($t eq "HYPER_T" or $t eq "NTTIME"); + + # Type is an enum + + return "FT_UINT16"; } # Determine the display base for an element @@ -123,9 +126,13 @@ sub elementbase($) return "BASE_" . uc($base); } - return "BASE_DEC", if ($e->{TYPE} eq "uint32") or - ($e->{TYPE} eq "uint16") or ($e->{TYPE} eq "uint8"); - return "BASE_NONE"; + return "BASE_DEC", if $e->{TYPE} eq "ENUM"; + return "BASE_DEC", if $e->{TYPE} =~ /u?int(8|16|32|64)/; + return "BASE_DEC", if $e->{TYPE} eq "NTTIME" or $e->{TYPE} eq "HYPER_T"; + + # Probably an enum + + return "BASE_DEC"; } # Convert a IDL structure field name (e.g access_mask) to a prettier @@ -230,13 +237,10 @@ sub NeededTypedef($) } if ($t->{DATA}->{TYPE} eq "ENUM") { - use Data::Dumper; - print Dumper($t); - $needed{"hf_$t->{NAME}"} = { 'name' => $t->{NAME}, - 'ft' => 'FT_UINT32', - 'base' => 'BASE_HEX' + 'ft' => 'FT_UINT16', + 'base' => 'BASE_DEC' }; } } |