BGE Python API cleanup - no functionality changes

- comments to PyObjectPlus.h
- remove unused/commented junk.
- renamed PyDestructor to py_base_dealloc for consistency
- all the PyTypeObject's were still using the sizeof() their class, can use sizeof(PyObjectPlus_Proxy) now which is smaller too.
This commit is contained in:
Campbell Barton
2009-04-19 14:57:52 +00:00
parent 8d2cb5bea4
commit 7dbc9dc719
63 changed files with 200 additions and 247 deletions

View File

@@ -227,9 +227,9 @@ PyTypeObject SCA_PythonController::Type = {
PyObject_HEAD_INIT(NULL)
0,
"SCA_PythonController",
sizeof(SCA_PythonController),
sizeof(PyObjectPlus_Proxy),
0,
PyDestructor,
py_base_dealloc,
0,
0,
0,
@@ -441,9 +441,7 @@ SCA_PythonController::PyGetSensor(PyObject* self, PyObject* value)
}
}
char emsg[96];
PyOS_snprintf( emsg, sizeof( emsg ), "Unable to find requested sensor \"%s\"", scriptArg );
PyErr_SetString(PyExc_AttributeError, emsg);
PyErr_Format(PyExc_AttributeError, "Unable to find requested sensor \"%s\"", scriptArg);
return NULL;
}
@@ -470,9 +468,7 @@ SCA_PythonController::PyGetActuator(PyObject* self, PyObject* value)
}
}
char emsg[96];
PyOS_snprintf( emsg, sizeof( emsg ), "Unable to find requested actuator \"%s\"", scriptArg );
PyErr_SetString(PyExc_AttributeError, emsg);
PyErr_Format(PyExc_AttributeError, "Unable to find requested actuator \"%s\"", scriptArg);
return NULL;
}