Some users could not build with python 2.5, hopefully this fixes it.

This commit is contained in:
Campbell Barton
2009-04-03 15:08:38 +00:00
parent bc789af5a9
commit e6985d31b5
2 changed files with 3 additions and 3 deletions

View 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 */
};

View 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);