From b3763c8dc8359af2dca8abc0652ec25f24c7711a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 30 Jun 2018 17:47:01 +0100 Subject: [PATCH] Remove SWIG_STATIC_POINTER (Python) It's use has been removed to discourage thread unsafe static initialisation. --- Lib/python/pyrun.swg | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index e262b657e..51ea81306 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -210,16 +210,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi /* A functor is a function object with one single object argument */ #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, (char*)"O", obj); -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - /* ----------------------------------------------------------------------------- * Pointer declarations * ----------------------------------------------------------------------------- */