From b96d531bc97ec763e96a5f7a28993d70a0a9e637 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 Apr 2014 23:13:25 +1000 Subject: Python: move to version 3.4x on all platforms --- source/blender/python/generic/py_capi_utils.c | 16 ---------------- source/blender/python/generic/py_capi_utils.h | 4 ---- source/blender/python/intern/bpy_util.h | 4 ++-- 3 files changed, 2 insertions(+), 22 deletions(-) (limited to 'source/blender/python') 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; -- cgit v1.2.3