svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / gameengine / VideoTexture / ImageViewport.cpp
index d2c23e758f6d03cdf2800e843eb367584e0de833..55b143962805ddf571ff3fc44295d6c92692b59a 100644 (file)
@@ -218,16 +218,16 @@ static int ImageViewport_setPosition (PyImage * self, PyObject * value, void * c
 {
        // check validity of parameter
        if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 2
-               || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
-               || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1)))
+               || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+               || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1)))
        {
                PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 ints");
                return -1;
        }
        // set position
        GLint pos [] = {
-               GLint(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
-                       GLint(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1)))
+               GLint(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+                       GLint(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1)))
        };
        getImageViewport(self)->setPosition(pos);
        // success
@@ -246,16 +246,16 @@ int ImageViewport_setCaptureSize (PyImage * self, PyObject * value, void * closu
 {
        // check validity of parameter
        if (value == NULL || !PySequence_Check(value) || PySequence_Length(value) != 2
-               || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 0))
-               || !PyInt_Check(PySequence_Fast_GET_ITEM(value, 1)))
+               || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 0))
+               || !PyLong_Check(PySequence_Fast_GET_ITEM(value, 1)))
        {
                PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 ints");
                return -1;
        }
        // set capture size
        short size [] = {
-               short(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 0))),
-                       short(PyInt_AsLong(PySequence_Fast_GET_ITEM(value, 1)))
+               short(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
+                       short(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1)))
        };
        getImageViewport(self)->setCaptureSize(size);
        // success