Merged changes in the trunk up to revision 51985.

This commit is contained in:
2012-11-07 22:12:19 +00:00
409 changed files with 7086 additions and 2236 deletions

View File

@@ -32,6 +32,9 @@
#include <Python.h>
#include "RNA_types.h"
#include "RNA_access.h"
#include "bpy.h"
#include "bpy_util.h"
#include "bpy_rna.h"
@@ -49,8 +52,6 @@
#include "BKE_global.h" /* XXX, G.main only */
#include "BKE_blender.h"
#include "RNA_access.h"
#include "MEM_guardedalloc.h"
/* external util modules */

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

@@ -24,15 +24,20 @@
* \ingroup pythonintern
*/
#ifndef __BPY_UTIL_H__
#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
#include "RNA_types.h" /* for EnumPropertyItem only */
#if PY_VERSION_HEX < 0x03030000
# ifdef _MSC_VER
# pragma message("Python 3.2 will be deprecated soon, upgrade to Python 3.3.")
# else
# warning "Python 3.2 will be deprecated soon, upgrade to Python 3.3."
# endif
#endif
struct EnumPropertyItem;
struct ReportList;
@@ -51,4 +56,5 @@ void BPy_SetContext(struct bContext *C);
extern void bpy_context_set(struct bContext *C, PyGILState_STATE *gilstate);
extern void bpy_context_clear(struct bContext *C, PyGILState_STATE *gilstate);
#endif
#endif /* __BPY_UTIL_H__ */