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:
Stefan Zager 2011-01-06 00:09:25 +00:00
commit 8ac54d1d5e
7 changed files with 152 additions and 28 deletions

View file

@ -71,12 +71,33 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
/* Set a constant value */
#if defined(SWIGPYTHON_BUILTIN)
SWIGINTERN void
pyswig_add_public_symbol (PyObject *seq, const char *key) {
PyObject *s = PyString_InternFromString(key);
PyList_Append(seq, s);
Py_DECREF(s);
}
SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
PyDict_SetItemString(d, (char*) name, obj);
Py_DECREF(obj);
if (public_interface)
pyswig_add_public_symbol(public_interface, name);
}
#else
SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
PyDict_SetItemString(d, (char*) name, obj);
Py_DECREF(obj);
}
#endif
/* Append a value to the result obj */
SWIGINTERN PyObject*