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

@@ -437,7 +437,9 @@ PyObject * Image_getSource (PyImage * self, PyObject * args)
{
// get arguments
char * id;
if (self->m_image != NULL && PyArg_ParseTuple(args, "s", &id))
if (!PyArg_ParseTuple(args, "s:getSource", &id))
return NULL;
if (self->m_image != NULL)
{
// get source object
PyObject * src = reinterpret_cast<PyObject*>(self->m_image->getSource(id));
@@ -460,7 +462,9 @@ PyObject * Image_setSource (PyImage * self, PyObject * args)
// get arguments
char * id;
PyObject * obj;
if (self->m_image != NULL && PyArg_ParseTuple(args, "sO", &id, &obj))
if (!PyArg_ParseTuple(args, "sO:setSource", &id, &obj))
return NULL;
if (self->m_image != NULL)
{
// check type of object
if (pyImageTypes.in(obj->ob_type))