default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.

also remove casts to keep Python3.2 warning quiet.
This commit is contained in:
2012-11-05 13:48:42 +00:00
parent 6ee3bf5300
commit 004f8d78ed
11 changed files with 25 additions and 20 deletions

View File

@@ -2612,7 +2612,7 @@ static PyObject *pyrna_prop_array_subscript(BPy_PropertyArrayRNA *self, PyObject
int len = pyrna_prop_array_length(self);
Py_ssize_t start, stop, slicelength;
if (PySlice_GetIndicesEx((void *)key, len, &start, &stop, &step, &slicelength) < 0)
if (PySlice_GetIndicesEx(key, len, &start, &stop, &step, &slicelength) < 0)
return NULL;
if (slicelength <= 0) {
@@ -2780,7 +2780,7 @@ static int pyrna_prop_array_ass_subscript(BPy_PropertyArrayRNA *self, PyObject *
int len = RNA_property_array_length(&self->ptr, self->prop);
Py_ssize_t start, stop, step, slicelength;
if (PySlice_GetIndicesEx((void *)key, len, &start, &stop, &step, &slicelength) < 0) {
if (PySlice_GetIndicesEx(key, len, &start, &stop, &step, &slicelength) < 0) {
ret = -1;
}
else if (slicelength <= 0) {

View File

@@ -29,9 +29,14 @@
#define __BPY_UTIL_H__
#if PY_VERSION_HEX < 0x03020000
#error "Python 3.2 or greater is required, you'll need to update your python."
# error "Python 3.2 or greater is required, you'll need to update your python."
#endif
#if PY_VERSION_HEX < 0x03030000
# warning "Python 3.2 will be deprecated soon, upgrade to Python 3.3."
#endif
#include "RNA_types.h" /* for EnumPropertyItem only */
struct EnumPropertyItem;