diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-02 01:20:18 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-02 01:20:18 +0300 |
commit | d1e75c215b79250fb4262a0e18d8912b11589b0f (patch) | |
tree | 5fe3045d1e3f28ccda287ed3baf52583c3d70eb8 /source/blender | |
parent | 23a77e76885d6833edc3bd69619f17174c23b8ee (diff) |
* make sure there are no redefinitions (I'm using py2.5 and ie PyUnicode_Check define exists
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/intern/bpy_compat.h | 13 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_compat.h b/source/blender/python/intern/bpy_compat.h index 967937600ee..cadea4b1e61 100644 --- a/source/blender/python/intern/bpy_compat.h +++ b/source/blender/python/intern/bpy_compat.h @@ -27,13 +27,24 @@ * no utility functions please */ +#ifndef BPY_COMPAT_H__ +#define BPY_COMPAT_H__ + /* if you are NOT using python 3.0 - define these */ #if PY_VERSION_HEX < 0x03000000 #define _PyUnicode_AsString PyString_AsString + +#ifndef PyUnicode_Check #define PyUnicode_Check PyString_Check +#endif + #define PyLong_FromSize_t PyInt_FromLong #define PyLong_AsSsize_t PyInt_AsLong + +#ifndef PyLong_Check #define PyLong_Check PyInt_Check +#endif + #define PyUnicode_FromString PyString_FromString #define PyUnicode_FromFormat PyString_FromFormat @@ -47,3 +58,5 @@ #if (PY_VERSION_HEX < 0x02050000) #define Py_ssize_t ssize_t #endif + +#endif /* BPY_COMPAT_H__ */ diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index d6df4645be0..b8727a53d8a 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -788,7 +788,7 @@ PyObject *pyrna_prop_items(BPy_PropertyRNA *self) { PyObject *ret; if (RNA_property_type(&self->ptr, self->prop) != PROP_COLLECTION) { - PyErr_SetString( PyExc_TypeError, "keys() is only valid for collection types" ); + PyErr_SetString( PyExc_TypeError, "items() is only valid for collection types" ); ret = NULL; } else { PyObject *item; |