We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b07543 commit 560e4aeCopy full SHA for 560e4ae
1 file changed
include/defines.h
@@ -15,8 +15,10 @@
15
#define PyUniStr_AsStrOrUTF8(obj) (char*)PyUnicode_AsUTF8(obj)
16
#elif (PY_MAJOR_VERSION >= 3)
17
#define PyUniStr_AsStrOrUTF8(obj) PyUnicode_AsUTF8(obj)
18
+#elif (PY_MAJOR_VERSION == 2)
19
+#define PyUniStr_AsStrOrUTF8(obj) PyString_AsString(obj)
20
#else
-#define PyStrOrUni_AsStrOrUTF8(obj) PyString_AsString(obj)
21
+#error Failed to suppport PyUnicode_AsUTF8
22
#endif
23
24
// Enable use of generic device settings object in 803 or newer.
0 commit comments