* after discussion with cambo on IRC, change the #ifndef's to #undefs instead:
authorNathan Letwory <nathan@letworyinteractive.com>
Mon, 1 Dec 2008 23:38:22 +0000 (23:38 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Mon, 1 Dec 2008 23:38:22 +0000 (23:38 +0000)
  Pre-Python 3.0 has strings default non-unicode, so checks and handling should be done so too.

source/blender/python/intern/bpy_compat.h

index cadea4b1e612a14c37f24ec49bee609f312df530..348947b7fcbf6881013520d033e24d6650ab4189 100644 (file)
 #if PY_VERSION_HEX < 0x03000000
 #define _PyUnicode_AsString PyString_AsString
 
-#ifndef PyUnicode_Check
+#undef PyUnicode_Check
 #define PyUnicode_Check PyString_Check
-#endif
 
 #define PyLong_FromSize_t PyInt_FromLong
 #define PyLong_AsSsize_t PyInt_AsLong
 
-#ifndef PyLong_Check
+#undef PyLong_Check
 #define PyLong_Check PyInt_Check
-#endif
 
 #define PyUnicode_FromString PyString_FromString
 #define PyUnicode_FromFormat PyString_FromFormat