VideoTexture: exception in C++ was not returning an error in Python. Added function name ini PyArg_ParseTuple.

This commit is contained in:
2009-05-24 23:12:38 +00:00
parent 4e0e720158
commit 323052068a
6 changed files with 21 additions and 13 deletions

View File

@@ -71,10 +71,9 @@ static PyObject * load (PyImage * self, PyObject * args)
short width;
short height;
// parse parameters
if (!PyArg_ParseTuple(args, "s#hh", &buff, &buffSize, &width, &height))
if (!PyArg_ParseTuple(args, "s#hh:load", &buff, &buffSize, &width, &height))
{
// report error
PyErr_SetString(PyExc_TypeError, "Parameters are not correct");
return NULL;
}
// else check buffer size