summaryrefslogtreecommitdiff
path: root/source4/build/pidl/util.pm
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-08 02:55:28 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-08 02:55:28 +0000
commit2773e54c9872ce5b98dd808a0ae07034103420e2 (patch)
tree686206642b3e037cd330bc93582ea387ad416f65 /source4/build/pidl/util.pm
parent58714e6bda5c12388119cba8688c7cd7140ce85f (diff)
downloadsamba-2773e54c9872ce5b98dd808a0ae07034103420e2.tar.gz
samba-2773e54c9872ce5b98dd808a0ae07034103420e2.tar.bz2
samba-2773e54c9872ce5b98dd808a0ae07034103420e2.zip
commit idl.pm now, as many build farm machines don't have 'yapp'
(This used to be commit 2b1300386dc8a3e3e802c8b1dafdbea286cfbb46)
Diffstat (limited to 'source4/build/pidl/util.pm')
-rw-r--r--source4/build/pidl/util.pm40
1 files changed, 9 insertions, 31 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 08a8917fa5..57ce80253f 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -152,23 +152,7 @@ sub has_property($$)
return undef;
}
- my($props) = $e->{PROPERTIES};
-
- 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;
+ return $e->{PROPERTIES}->{$p};
}
@@ -176,20 +160,14 @@ sub is_scalar_type($)
{
my($type) = shift;
- return 1, if ($type eq "uint32");
- return 1, if ($type eq "long");
- return 1, if ($type eq "short");
- return 1, if ($type eq "char");
- return 1, if ($type eq "uint8");
- return 1, if ($type eq "uint16");
- return 1, if ($type eq "NTTIME");
- 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");
+ if ($type =~ /uint\d+/) {
+ return 1;
+ }
+ if ($type =~ /char|short|long|NTTIME|
+ time_t|error_status_t|boolean32|unsigned32|
+ HYPER_T|wchar_t|DATA_BLOB/x) {
+ return 1;
+ }
return 0;
}