Python options simplification: Remove -buildnone, -nobuildnone

A custom implementation for Py_None was implemented in SWIG_Py_None().
This was used by default on Windows only. It isn't clear why this
was done just for Windows. Now Py_None is the real Py_None on all
operating systems.
This commit is contained in:
William S Fulton 2018-10-12 21:53:03 +01:00
commit b2aa01f492
3 changed files with 4 additions and 54 deletions

View file

@ -380,9 +380,6 @@ SWIG_init(void) {
#endif
/* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
#ifdef SWIG_PYTHON_BUILD_NONE
SWIG_Py_None();
#endif
SWIG_This();
SWIG_Python_TypeCache();
SwigPyPacked_type();

View file

@ -237,33 +237,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
extern "C" {
#endif
/* How to access Py_None */
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# ifndef SWIG_PYTHON_NO_BUILD_NONE
# ifndef SWIG_PYTHON_BUILD_NONE
# define SWIG_PYTHON_BUILD_NONE
# endif
# endif
#endif
#ifdef SWIG_PYTHON_BUILD_NONE
# ifdef Py_None
# undef Py_None
# define Py_None SWIG_Py_None()
# endif
SWIGRUNTIME PyObject *
SWIG_Py_None(void)
{
static PyObject *none = NULL;
if (!none) {
none = Py_BuildValue("");
Py_DECREF(none);
}
return none;
}
#endif
/* The python void return value */
SWIGRUNTIMEINLINE PyObject *