Some users could not build with python 2.5, hopefully this fixes it.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 3 Apr 2009 15:08:38 +0000 (15:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 3 Apr 2009 15:08:38 +0000 (15:08 +0000)
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h

index f0c5667479c26d7a08ff2e1d0f558dffb6bc6d53..e79ef5ab72b41a5d1d94afe658d82517abd1da9e 100644 (file)
@@ -1104,7 +1104,7 @@ PyObject* KX_GameObject::PyGetPosition(PyObject* self)
 }
 
 
-int KX_GameObject::Map_Len(PyObject* self_v)
+Py_ssize_t KX_GameObject::Map_Len(PyObject* self_v)
 {
        return (static_cast<KX_GameObject*>(self_v))->GetPropertyCount();
 }
@@ -1173,7 +1173,7 @@ int KX_GameObject::Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
 
 
 PyMappingMethods KX_GameObject::Mapping = {
-       (inquiry)KX_GameObject::Map_Len,                        /*inquiry mp_length */
+       (lenfunc)KX_GameObject::Map_Len,                        /*inquiry mp_length */
        (binaryfunc)KX_GameObject::Map_GetItem,         /*binaryfunc mp_subscript */
        (objobjargproc)KX_GameObject::Map_SetItem,      /*objobjargproc mp_ass_subscript */
 };
index 4b136e268dbac1e9637135e20fa160778caaecbd..9ed35b6d26bc50063184b7330edaf0f18cec3cfa 100644 (file)
@@ -826,7 +826,7 @@ public:
        static PyObject*        pyattr_get_dir_dict(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
        
        /* getitem/setitem */
-       static int                                      Map_Len(PyObject* self);
+       static Py_ssize_t                       Map_Len(PyObject* self);
        static PyMappingMethods Mapping;
        static PyObject*                        Map_GetItem(PyObject *self_v, PyObject *item);
        static int                                      Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val);