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
|
|
@ -369,3 +369,25 @@ SwigPyStaticVar_new_getset (PyTypeObject *type, PyGetSetDef *getset)
|
|||
}
|
||||
return descr;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <vector>
|
||||
|
||||
SWIGINTERN void
|
||||
pyswig_builtin_init_bases (PyTypeObject *type, std::vector<PyTypeObject*>& bases)
|
||||
{
|
||||
if (!bases.size())
|
||||
bases.push_back(SwigPyObject_type());
|
||||
type->tp_base = bases[0];
|
||||
Py_INCREF((PyObject*) bases[0]);
|
||||
PyObject *tuple = PyTuple_New(bases.size());
|
||||
int i;
|
||||
for (i = 0; i < bases.size(); ++i) {
|
||||
PyTuple_SET_ITEM(tuple, i, (PyObject*) bases[i]);
|
||||
Py_INCREF((PyObject*) bases[i]);
|
||||
}
|
||||
type->tp_bases = tuple;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue