1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

commit idl.pm now, as many build farm machines don't have 'yapp'

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent be2c2be459
commit 2b1300386d
4 changed files with 1999 additions and 36 deletions

View File

@ -1,2 +1 @@
*.pidl *.pidl
idl.pm

1986
source/build/pidl/idl.pm Normal file

File diff suppressed because it is too large Load Diff

View File

@ -191,14 +191,14 @@ array_len:
property_list: property_list:
#empty #empty
| property_list '[' properties ']' { util::FlattenArray([$_[1],$_[3]]); } | property_list '[' properties ']' { util::FlattenHash([$_[1],$_[3]]); }
; ;
properties: property { [ $_[1] ] } properties: property { $_[1] }
| properties ',' property { push(@{$_[1]}, $_[3]); $_[1] } | properties ',' property { util::FlattenHash([$_[1], $_[3]]); }
; ;
property: identifier property: identifier {{ "$_[1]" => "1" }}
| identifier '(' anytext ')' {{ "$_[1]" => "$_[3]" }} | identifier '(' anytext ')' {{ "$_[1]" => "$_[3]" }}
; ;

View File

@ -152,23 +152,7 @@ sub has_property($$)
return undef; return undef;
} }
my($props) = $e->{PROPERTIES}; return $e->{PROPERTIES}->{$p};
foreach my $d (@{$props}) {
if (ref($d) ne "HASH") {
if ($d eq $p) {
return 1;
}
} else {
foreach my $k (keys %{$d}) {
if ($k eq $p) {
return $d->{$k};
}
}
}
}
return undef;
} }
@ -176,20 +160,14 @@ sub is_scalar_type($)
{ {
my($type) = shift; my($type) = shift;
return 1, if ($type eq "uint32"); if ($type =~ /uint\d+/) {
return 1, if ($type eq "long"); return 1;
return 1, if ($type eq "short"); }
return 1, if ($type eq "char"); if ($type =~ /char|short|long|NTTIME|
return 1, if ($type eq "uint8"); time_t|error_status_t|boolean32|unsigned32|
return 1, if ($type eq "uint16"); HYPER_T|wchar_t|DATA_BLOB/x) {
return 1, if ($type eq "NTTIME"); return 1;
return 1, if ($type eq "time_t"); }
return 1, if ($type eq "error_status_t");
return 1, if ($type eq "boolean32");
return 1, if ($type eq "unsigned32");
return 1, if ($type eq "HYPER_T");
return 1, if ($type eq "wchar_t");
return 1, if ($type eq "DATA_BLOB");
return 0; return 0;
} }