pyapi internal api code: check for == -1 rather then < 0, for known error returns.

This commit is contained in:
2013-01-10 15:22:19 +00:00
parent e56844e98b
commit 1c99e6aa0b
5 changed files with 19 additions and 19 deletions

View File

@@ -182,7 +182,7 @@ static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *clos
const int flag = GET_INT_FROM_POINTER(closure);
const int param = PyObject_IsTrue(value);
if (param < 0) {
if (param == -1) {
PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False");
return -1;
}