summaryrefslogtreecommitdiff
path: root/source4/build/pidl/util.pm
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-08 11:19:39 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-08 11:19:39 +0000
commit4e4a63d5185d1567c115e7cbf15022b0fbcbc870 (patch)
treeb16be9157d0b5c68ec2cbe7daa8b9f1ecef7dc5f /source4/build/pidl/util.pm
parent3043b766c86d2d814e617d33c48316addff762b5 (diff)
downloadsamba-4e4a63d5185d1567c115e7cbf15022b0fbcbc870.tar.gz
samba-4e4a63d5185d1567c115e7cbf15022b0fbcbc870.tar.bz2
samba-4e4a63d5185d1567c115e7cbf15022b0fbcbc870.zip
- generate both the pull and push side
- fixed lots of bugs (This used to be commit 96e269fefedd1e8541eae7ad5e3fb98df978c81b)
Diffstat (limited to 'source4/build/pidl/util.pm')
-rw-r--r--source4/build/pidl/util.pm43
1 files changed, 30 insertions, 13 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 53e391eb42..1c8ad720bb 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -147,21 +147,24 @@ sub LoadStructure($)
# see if a pidl property list contains a give property
sub has_property($$)
{
- my($props) = shift;
- my($p) = shift;
-
- foreach my $d (@{$props}) {
- if (ref($d) ne "HASH") {
- return 1, if ($d eq $p);
- return 1, if ($d eq "in,out" && ($p eq "in" || $p eq "out"));
- } else {
- foreach my $k (keys %{$d}) {
- return $d->{$k}, if ($k eq $p);
- }
+ my($props) = shift;
+ my($p) = shift;
+
+ 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 0;
+ return undef;
}
@@ -181,6 +184,20 @@ sub is_scalar_type($)
return 0;
}
+sub is_builtin_type($)
+{
+ my($type) = shift;
+
+ return 1, if (is_scalar_type($type));
+ return 1, if ($type eq "unistr");
+ return 1, if ($type eq "security_descriptor");
+ return 1, if ($type eq "dom_sid");
+ return 1, if ($type eq "dom_sid2");
+ return 1, if ($type eq "policy_handle");
+
+ return 0;
+}
+
1;