r5241: Generate swig wrappers for unions as well as structures.
authorTim Potter <tpot@samba.org>
Sun, 6 Feb 2005 00:18:46 +0000 (00:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:33 +0000 (13:09 -0500)
source/build/pidl/swig.pm

index 2b8daf40ffe579e92b918d26dd8ed094c105c245..11894719f5fe59c14766d4d84f711ac586d6b88b 100644 (file)
@@ -709,9 +709,9 @@ sub RewriteHeader($$$)
 
        s/dom_sid2/dom_sid/g;
 
-       # Copy structure definitions
+       # Copy structure and union definitions
 
-       if (/^struct .*? {$/ .. /^\};$/) {
+       if (/^(struct|union) .*? {$/ .. /^\};$/) {
            s/\} (in|out);/\} data_$1;/; # "in" is a Python keyword
            pidl $_;
            next;