diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-21 06:28:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-21 06:28:36 +0400 |
commit | 3fd388fb06e474a4e9e2f6816eb0a0b95ab433e7 (patch) | |
tree | 214a3ade3c842bc301aa6bedf7f3f826c873b2a6 /source/blender/python/bmesh/bmesh_py_types_customdata.c | |
parent | 387bb73e4343be164f167565cefebbee613cdb7b (diff) |
py api cleanup, replace use...
- PyLong_FromSsize_t --> PyLong_FromLong
- PyLong_AsSsize_t --> PyLong_AsLong
In all places except for those where python api expects PySsize_t (index lookups mainly).
- use PyBool_FromLong in a few areas of the BGE.
- fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types_customdata.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 1fea12d105c..14132d08fe6 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -981,7 +981,7 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer) } case CD_PROP_INT: { - ret = PyLong_FromSsize_t((Py_ssize_t)(*(int *)value)); + ret = PyLong_FromLong(*(int *)value); break; } case CD_PROP_STR: @@ -1060,7 +1060,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj } case CD_PROP_INT: { - int tmp_val = PyLong_AsSsize_t(py_value); + int tmp_val = PyLong_AsLong(py_value); if (UNLIKELY(tmp_val == -1 && PyErr_Occurred())) { PyErr_Format(PyExc_TypeError, "expected an int, not a %.200s", Py_TYPE(py_value)->tp_name); ret = -1; |