diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-10-12 21:53:03 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-10-22 08:19:50 +0100 |
commit | b2aa01f492846d8b835f51beb89df569fa6c504b (patch) | |
tree | 2be37e0aa20a7f0a78bdf83a9c21dd6bc28dc9da /Lib/python | |
parent | d84d26832f4f8cdaa4f14cf0f93126afb11363ad (diff) | |
download | swig-b2aa01f492846d8b835f51beb89df569fa6c504b.tar.gz |
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.
Diffstat (limited to 'Lib/python')
-rw-r--r-- | Lib/python/pyinit.swg | 3 | ||||
-rw-r--r-- | Lib/python/pyrun.swg | 27 |
2 files changed, 0 insertions, 30 deletions
diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg index 4e13ed57a..d4985ee78 100644 --- a/Lib/python/pyinit.swg +++ b/Lib/python/pyinit.swg @@ -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(); diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 53c3a32d1..9850a7c27 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -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 * |