Director issues should be mostly clean now.
Refactored some type initialization out of SWIG_init. Use __all__ attribute of module to define public interface. This is necessary to make available symbols starting with '_'. Now dying on li_boost_shared_ptr. Looks like it's gonna be ugly. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12373 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b77b64944b
commit
8ac54d1d5e
7 changed files with 152 additions and 28 deletions
|
|
@ -51,7 +51,11 @@
|
|||
#define SWIG_AppendOutput(result, obj) SWIG_Python_AppendOutput(result, obj)
|
||||
|
||||
/* set constant */
|
||||
#define SWIG_SetConstant(name, obj) SWIG_Python_SetConstant(d, name,obj)
|
||||
#if defined(SWIGPYTHON_BUILTIN)
|
||||
#define SWIG_SetConstant(name, obj) SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, name,obj)
|
||||
#else
|
||||
#define SWIG_SetConstant(name, obj) SWIG_Python_SetConstant(d, name,obj)
|
||||
#endif
|
||||
|
||||
/* raise */
|
||||
#define SWIG_Raise(obj, type, desc) SWIG_Python_Raise(obj, type, desc)
|
||||
|
|
@ -84,6 +88,10 @@
|
|||
$result = SWIG_NewPointerObj(%new_copy(*$1, $*ltype), $descriptor, SWIG_POINTER_OWN | %newpointer_flags);
|
||||
}
|
||||
|
||||
%typemap(builtin_init,noblock=1) const SWIGTYPE & SMARTPOINTER {
|
||||
$result = SWIG_NewBuiltinObj(self, %new_copy(*$1, $*ltype), $descriptor, SWIG_POINTER_OWN | %newpointer_flags);
|
||||
}
|
||||
|
||||
%typemap(ret,noblock=1) const SWIGTYPE & SMARTPOINTER, SWIGTYPE SMARTPOINTER {
|
||||
if ($result) {
|
||||
PyObject *robj = PyObject_CallMethod($result, (char *)"__deref__", NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue