diff options
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 16 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_util.h | 4 |
3 files changed, 2 insertions, 22 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 44b551cefcc..33ff63a9a28 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -904,19 +904,3 @@ PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag) return ret; } - -/* compat only */ -#if PY_VERSION_HEX < 0x03030200 -int -_PyLong_AsInt(PyObject *obj) -{ - int overflow; - long result = PyLong_AsLongAndOverflow(obj, &overflow); - if (overflow || result > INT_MAX || result < INT_MIN) { - PyErr_SetString(PyExc_OverflowError, - "Python int too large to convert to C int"); - return -1; - } - return (int)result; -} -#endif diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index 27dd1bba6d6..0afc4dd98d9 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -73,8 +73,4 @@ int PyC_FlagSet_ValueFromID(PyC_FlagSet *item, const char *identifier, int int PyC_FlagSet_ToBitfield(PyC_FlagSet *items, PyObject *value, int *r_value, const char *error_prefix); PyObject *PyC_FlagSet_FromBitfield(PyC_FlagSet *items, int flag); -#if PY_VERSION_HEX < 0x03030200 -int _PyLong_AsInt(PyObject *obj); -#endif - #endif /* __PY_CAPI_UTILS_H__ */ diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h index b007e123cfc..d19696aa230 100644 --- a/source/blender/python/intern/bpy_util.h +++ b/source/blender/python/intern/bpy_util.h @@ -27,8 +27,8 @@ #ifndef __BPY_UTIL_H__ #define __BPY_UTIL_H__ -#if PY_VERSION_HEX < 0x03030000 -# error "Python 3.3 or greater is required, you'll need to update your python." +#if PY_VERSION_HEX < 0x03040000 +# error "Python 3.4 or greater is required, you'll need to update your python." #endif struct EnumPropertyItem; |