From 4e066d4f8308501647577e3db31726f67509178c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 21 Nov 2007 12:31:23 +0100 Subject: r26072: Import trivial SWIG wrapper for talloc. (cherry picked from commit 02d259c2c45c03dbfcd16173df93d7ba96ed1419) (This used to be commit 5938a732381abed9f5da1db505626b354fe7293e) --- source3/lib/talloc/talloc.i | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 source3/lib/talloc/talloc.i (limited to 'source3/lib/talloc/talloc.i') diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i new file mode 100644 index 0000000000..c35d5d2411 --- /dev/null +++ b/source3/lib/talloc/talloc.i @@ -0,0 +1,24 @@ +/* + Unix SMB/CIFS implementation. + Copyright (C) Jelmer Vernooij 2007 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/* Don't expose talloc contexts in Python code. Python does reference + counting for us, so just create a new top-level talloc context. + */ +%typemap(in, numinputs=0) TALLOC_CTX * { + $1 = NULL; +} -- cgit From fbc295fb37c8787d01472d3cec63adb3efea5803 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 28 Nov 2007 22:41:34 +0100 Subject: r26187: Fix module name, indentation. (cherry picked from parts of commit ef790ebf3a712dbbb85d6af65c804199c2c084fc) Michael (This used to be commit 8e35bbeac286c3b8d64d69ebe9bb4a8f5405a9c0) --- source3/lib/talloc/talloc.i | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/lib/talloc/talloc.i') diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i index c35d5d2411..593c20465e 100644 --- a/source3/lib/talloc/talloc.i +++ b/source3/lib/talloc/talloc.i @@ -19,6 +19,8 @@ /* Don't expose talloc contexts in Python code. Python does reference counting for us, so just create a new top-level talloc context. */ +%module talloc; + %typemap(in, numinputs=0) TALLOC_CTX * { $1 = NULL; } -- cgit From 461ad00b1f090d5328c234e45eb7ab906252d93d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 29 Nov 2007 14:49:47 +0100 Subject: r26197: Add bindings for libsecurity. (cherry picked from parts of commit 8625cd403ba3a7d2b1b1fccfeb5efd7e21de0135) Michael (This used to be commit 22d48224d3235403b916c98c92915165fe7ef330) --- source3/lib/talloc/talloc.i | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/lib/talloc/talloc.i') diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i index 593c20465e..c35d5d2411 100644 --- a/source3/lib/talloc/talloc.i +++ b/source3/lib/talloc/talloc.i @@ -19,8 +19,6 @@ /* Don't expose talloc contexts in Python code. Python does reference counting for us, so just create a new top-level talloc context. */ -%module talloc; - %typemap(in, numinputs=0) TALLOC_CTX * { $1 = NULL; } -- cgit From 5a9f0cabf6512bcda1c05510a0f6f3affa91bd85 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 14 Dec 2007 14:28:07 +0100 Subject: r26454: Add simple SWIG macro for wrapping talloced types. (cherry picked from talloc parts of commit 760fcc8bfa2a7cd7641465cb3bae889e9e0fbc75) Michael (This used to be commit f4c59316b9251477556dd22cdd246607f4dfa845) --- source3/lib/talloc/talloc.i | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/lib/talloc/talloc.i') diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i index c35d5d2411..c852ae8f9f 100644 --- a/source3/lib/talloc/talloc.i +++ b/source3/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 -- cgit From 3d33ad711c6a700e57a73126a17a88b637b36679 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 23 Dec 2007 19:19:41 -0600 Subject: r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s. - Start working on Python equivalents for various EJS tests. - Fix regression in argument order for reg_diff_apply() in EJS bindings. (cherry picked from talloc part of commit c550c03372cb260b78f6a6c132e70571bc4cb852) Michael (This used to be commit a146145c28cc355fed47b8a1f322311ffc1a51ab) --- source3/lib/talloc/talloc.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/talloc/talloc.i') diff --git a/source3/lib/talloc/talloc.i b/source3/lib/talloc/talloc.i index c852ae8f9f..a9afb97ed7 100644 --- a/source3/lib/talloc/talloc.i +++ b/source3/lib/talloc/talloc.i @@ -19,7 +19,7 @@ /* Don't expose talloc contexts in Python code. Python does reference counting for us, so just create a new top-level talloc context. */ -%typemap(in, numinputs=0) TALLOC_CTX * { +%typemap(in, numinputs=0, noblock=1) TALLOC_CTX * { $1 = NULL; } -- cgit