X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d56cebe7a497773d8753ea2ab874c4445bac18dc..71aba8333cc915afff9e740c944f7fa7247abacb:/wxPython/src/libpy.c diff --git a/wxPython/src/libpy.c b/wxPython/src/libpy.c index 1116e677df..6fe6c00bfb 100644 --- a/wxPython/src/libpy.c +++ b/wxPython/src/libpy.c @@ -5,11 +5,11 @@ * Contains variable linking and pointer type-checking code. ************************************************************************/ +#include "Python.h" + #include #include -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif @@ -402,6 +402,7 @@ SWIGSTATICRUNTIME(char *) SWIG_GetPtrObj(PyObject *obj, void **ptr, char *type) { PyObject *sobj = obj; char *str; + if (!PyString_Check(obj)) { if (!PyInstance_Check(obj) || !(sobj = PyObject_GetAttrString(obj,"this"))) return "";