summaryrefslogtreecommitdiff
path: root/source4/lib/talloc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-14 14:28:07 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:22 +0100
commitdf8c7da800f75ff45fb48de59d7ce3f0667d375f (patch)
tree65c17e04d7f2e83d2266b6f71ef04c8e79a94d3f /source4/lib/talloc
parent43ac3d9b44b98d44db9b1550c47e8f96a410d1e9 (diff)
downloadsamba-df8c7da800f75ff45fb48de59d7ce3f0667d375f.tar.gz
samba-df8c7da800f75ff45fb48de59d7ce3f0667d375f.tar.bz2
samba-df8c7da800f75ff45fb48de59d7ce3f0667d375f.zip
r26454: Add simple SWIG macro for wrapping talloced types.
(This used to be commit 760fcc8bfa2a7cd7641465cb3bae889e9e0fbc75)
Diffstat (limited to 'source4/lib/talloc')
-rw-r--r--source4/lib/talloc/talloc.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/talloc/talloc.i b/source4/lib/talloc/talloc.i
index c35d5d2411..c852ae8f9f 100644
--- a/source4/lib/talloc/talloc.i
+++ b/source4/lib/talloc/talloc.i
@@ -22,3 +22,10 @@
%typemap(in, numinputs=0) TALLOC_CTX * {
$1 = NULL;
}
+
+%define %talloctype(TYPE)
+%nodefaultctor TYPE;
+%extend TYPE {
+ ~TYPE() { talloc_free($self); }
+}
+%enddef