pidl: add more mapped types
authorAndrew Tridgell <tridge@samba.org>
Wed, 8 Feb 2012 02:01:32 +0000 (13:01 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 8 Feb 2012 03:50:06 +0000 (04:50 +0100)
when we #define one type to another, we need special handling in the
python generator

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Feb  8 04:50:06 CET 2012 on sn-devel-104

pidl/lib/Parse/Pidl/Samba4/Python.pm

index 63f41a10eac2986ef1b03e46fcef393567db2bda..39884ab278d24913f7ad7c200dd8789c87888a14 100644 (file)
@@ -826,9 +826,15 @@ sub use_type_variable($$)
        my ($self, $orig_ctype) = @_;
        # FIXME: Have a global lookup table for types that look different on the 
        # wire than they are named in C?
-       if ($orig_ctype->{NAME} eq "dom_sid2" or $orig_ctype->{NAME} eq "dom_sid28") {
+       if ($orig_ctype->{NAME} eq "dom_sid2" or
+           $orig_ctype->{NAME} eq "dom_sid28" or
+           $orig_ctype->{NAME} eq "dom_sid0") {
                $orig_ctype->{NAME} = "dom_sid";
        }
+       if ($orig_ctype->{NAME} eq "spoolss_security_descriptor") {
+               $orig_ctype->{NAME} = "security_descriptor";
+       }
+
        my $ctype = resolveType($orig_ctype);
        unless (defined($ctype->{BASEFILE})) {
                return undef;