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/gameengine/Ketsji/BL_Shader.cpp | |
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/gameengine/Ketsji/BL_Shader.cpp')
-rw-r--r-- | source/gameengine/Ketsji/BL_Shader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index b047588df5a..4a74024b5bb 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -849,7 +849,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, delSource, "delSource( )" ) KX_PYMETHODDEF_DOC( BL_Shader, isValid, "isValid()" ) { - return PyLong_FromSsize_t( ( mShader !=0 && mOk ) ); + return PyBool_FromLong(( mShader !=0 && mOk )); } KX_PYMETHODDEF_DOC( BL_Shader, getVertexProg, "getVertexProg( )" ) @@ -1224,7 +1224,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformiv, "setUniformiv( uniform_name, (list2 for (unsigned int i=0; (i<list_size && i<4); i++) { PyObject *item = PySequence_GetItem(listPtr, i); - array_data[i] = PyLong_AsSsize_t(item); + array_data[i] = PyLong_AsLong(item); Py_DECREF(item); } |