r26455: Use new talloctype macro in generated SWIG code as well.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 14 Dec 2007 13:28:16 +0000 (14:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:50:23 +0000 (05:50 +0100)
(This used to be commit 77748c6a9f118c1a2fb9dbc76546d767f1cc27eb)

source4/pidl/lib/Parse/Pidl/Samba4/SWIG.pm

index 29f78359497bb6b622a436093a39b37f2b34970f..58b52df8d373a4a612096db0f620be3083a37143 100644 (file)
@@ -60,6 +60,8 @@ sub ParseInterface($$)
        pidl "typedef struct $if->{NAME} { struct dcerpc_pipe *pipe; } $if->{NAME};";
        pidl "}";
        pidl "";
+       pidl "%talloctype($if->{NAME});";
+       pidl "";
        pidl "\%extend $if->{NAME} {";
        indent();
        pidl "$if->{NAME} () {";
@@ -75,10 +77,6 @@ sub ParseInterface($$)
        deindent;
        pidl "}";
        pidl "";
-       pidl "~$if->{NAME}() {";
-       pidl "\ttalloc_free(\$self);";
-       pidl "}";
-       pidl "";
 
        foreach my $fn (@{$if->{FUNCTIONS}}) {
                pidl "/* $fn->{NAME} */";
@@ -158,6 +156,7 @@ sub Parse($$$$)
        pidl "%}";
        pidl "\%import \"../rpc/dcerpc.i\"";
        pidl "\%import \"../../libcli/util/errors.i\"";
+       pidl "\%import \"../../lib/talloc/talloc.i\"";
        pidl "";
        foreach (@$ndr) {
                IgnoreInterface($basename, $_) if ($_->{TYPE} eq "INTERFACE");