diff options
Diffstat (limited to 'source4/lib/talloc/talloc.i')
-rw-r--r-- | source4/lib/talloc/talloc.i | 7 |
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 |