Added function name to many of the PyArg_ParseTuple calls in gameengine

This way python raises more useful messages.
This commit is contained in:
Andre Susano Pinto
2009-04-10 16:45:19 +00:00
parent a412ce0702
commit 2fff90bbb4
38 changed files with 166 additions and 166 deletions

View File

@@ -197,7 +197,7 @@ PyObject* SCA_DelaySensor::PySetDelay(PyObject* self, PyObject* args, PyObject*
ShowDeprecationWarning("setDelay()", "the delay property");
int delay;
if(!PyArg_ParseTuple(args, "i", &delay)) {
if(!PyArg_ParseTuple(args, "i:setDelay", &delay)) {
return NULL;
}
if (delay < 0) {
@@ -219,7 +219,7 @@ PyObject* SCA_DelaySensor::PySetDuration(PyObject* self, PyObject* args, PyObjec
ShowDeprecationWarning("setDuration()", "the duration property");
int duration;
if(!PyArg_ParseTuple(args, "i", &duration)) {
if(!PyArg_ParseTuple(args, "i:setDuration", &duration)) {
return NULL;
}
if (duration < 0) {
@@ -240,7 +240,7 @@ PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject*
ShowDeprecationWarning("setRepeat()", "the repeat property");
int repeat;
if(!PyArg_ParseTuple(args, "i", &repeat)) {
if(!PyArg_ParseTuple(args, "i:setRepeat", &repeat)) {
return NULL;
}
m_repeat = (repeat != 0);