Remove lingering trace of support for Python 1.x
This commit is contained in:
parent
b189fb9456
commit
c9d2275a0c
1 changed files with 0 additions and 30 deletions
|
|
@ -1538,36 +1538,6 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
|
||||||
return (swig_module_info *) type_pointer;
|
return (swig_module_info *) type_pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if PY_MAJOR_VERSION < 2
|
|
||||||
/* PyModule_AddObject function was introduced in Python 2.0. The following function
|
|
||||||
is copied out of Python/modsupport.c in python version 2.3.4 */
|
|
||||||
SWIGINTERN int
|
|
||||||
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
|
||||||
{
|
|
||||||
PyObject *dict;
|
|
||||||
if (!PyModule_Check(m)) {
|
|
||||||
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
|
|
||||||
return SWIG_ERROR;
|
|
||||||
}
|
|
||||||
if (!o) {
|
|
||||||
PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
|
|
||||||
return SWIG_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
dict = PyModule_GetDict(m);
|
|
||||||
if (dict == NULL) {
|
|
||||||
/* Internal error -- modules must have a dict! */
|
|
||||||
PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
|
|
||||||
PyModule_GetName(m));
|
|
||||||
return SWIG_ERROR;
|
|
||||||
}
|
|
||||||
if (PyDict_SetItemString(dict, name, o))
|
|
||||||
return SWIG_ERROR;
|
|
||||||
Py_DECREF(o);
|
|
||||||
return SWIG_OK;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SWIGRUNTIME void
|
SWIGRUNTIME void
|
||||||
#ifdef SWIGPY_USE_CAPSULE
|
#ifdef SWIGPY_USE_CAPSULE
|
||||||
SWIG_Python_DestroyModule(PyObject *obj)
|
SWIG_Python_DestroyModule(PyObject *obj)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue