diff options
Diffstat (limited to 'src/plugins/python_plugins.c')
-rw-r--r-- | src/plugins/python_plugins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c index 94c77e99..c32d177c 100644 --- a/src/plugins/python_plugins.c +++ b/src/plugins/python_plugins.c @@ -908,7 +908,7 @@ _handle_string_or_none_result(ProfPlugin* plugin, PyObject* result, char* hook) _python_undefined_error(plugin, hook, "string, unicode or None"); return NULL; } -#if PY_MAJOR_VERSION >= 3 +#ifdef PY_IS_PYTHON3 if (result != Py_None && !PyUnicode_Check(result) && !PyBytes_Check(result)) { allow_python_threads(); _python_type_error(plugin, hook, "string, unicode or None"); |