mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
pidl/ws: whitespace cleanup
Imported from the WS repo. Signed-off-by: Aurelien Aptel <aaptel@suse.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
parent
372b41eede
commit
b18d075e5c
@ -1027,21 +1027,21 @@ sub ConvertObjectFromPythonData($$$$$$;$)
|
||||
my $ctype_alias = "";
|
||||
my $uint_max = "";
|
||||
if ($actual_ctype->{TYPE} eq "ENUM") {
|
||||
# Importantly, ENUM values are unsigned in pidl, and
|
||||
# typically map to uint32
|
||||
$ctype_alias = enum_type_fn($actual_ctype);
|
||||
# Importantly, ENUM values are unsigned in pidl, and
|
||||
# typically map to uint32
|
||||
$ctype_alias = enum_type_fn($actual_ctype);
|
||||
} elsif ($actual_ctype->{TYPE} eq "BITMAP") {
|
||||
$ctype_alias = bitmap_type_fn($actual_ctype);
|
||||
$ctype_alias = bitmap_type_fn($actual_ctype);
|
||||
} elsif ($actual_ctype->{TYPE} eq "SCALAR") {
|
||||
$ctype_alias = expandAlias($actual_ctype->{NAME});
|
||||
$ctype_alias = expandAlias($actual_ctype->{NAME});
|
||||
}
|
||||
|
||||
# This is the unsigned Python Integer -> C integer validation
|
||||
# case. The signed case is below.
|
||||
# case. The signed case is below.
|
||||
if ($ctype_alias =~ /^(uint[0-9]*|hyper|udlong|udlongr
|
||||
|NTTIME_hyper|NTTIME|NTTIME_1sec
|
||||
|uid_t|gid_t)$/x) {
|
||||
$self->pidl("{");
|
||||
|NTTIME_hyper|NTTIME|NTTIME_1sec
|
||||
|uid_t|gid_t)$/x) {
|
||||
$self->pidl("{");
|
||||
$self->indent;
|
||||
$self->pidl("const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof($target));");
|
||||
$self->pidl("if (PyLong_Check($cvar)) {");
|
||||
@ -1092,7 +1092,7 @@ sub ConvertObjectFromPythonData($$$$$$;$)
|
||||
# above, so while it looks like a duplicate, it is not
|
||||
# actually a duplicate.
|
||||
if ($ctype_alias =~ /^(dlong|char|int[0-9]*|time_t)$/x) {
|
||||
$self->pidl("{");
|
||||
$self->pidl("{");
|
||||
$self->indent;
|
||||
$self->pidl("const long long int_max = ndr_sizeof2intmax(sizeof($target));");
|
||||
$self->pidl("const long long int_min = -int_max - 1;");
|
||||
|
@ -1143,12 +1143,12 @@ sub Parse($$$$$)
|
||||
my $h_basename = basename($h_filename);
|
||||
|
||||
$self->{res}->{headers} .= "#include \"$h_basename\"\n";
|
||||
|
||||
$self->pidl_code("");
|
||||
|
||||
if (defined($self->{conformance}->{ett})) {
|
||||
register_ett($self,$_) foreach(@{$self->{conformance}->{ett}})
|
||||
}
|
||||
|
||||
# Wireshark protocol registration
|
||||
|
||||
foreach (@$ndr) {
|
||||
@ -1299,7 +1299,7 @@ sub DumpHfList($)
|
||||
foreach (sort {$a->{INDEX} cmp $b->{INDEX}} values %{$self->{conformance}->{header_fields}})
|
||||
{
|
||||
$res .= "\t{ &$_->{INDEX},
|
||||
{ ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }},
|
||||
{ ".make_str($_->{NAME}).", ".make_str($_->{FILTER}).", $_->{FT_TYPE}, $_->{BASE_TYPE}, $_->{VALSSTRING}, $_->{MASK}, ".make_str_or_null($_->{BLURB}).", HFILL }},
|
||||
";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user