small changes to py funcs that can run 100s of times a second, so python wont generate empty args tuple when they are not needed.
This commit is contained in:
@@ -242,8 +242,8 @@ PyParentObject SCA_ILogicBrick::Parents[] = {
|
||||
|
||||
|
||||
PyMethodDef SCA_ILogicBrick::Methods[] = {
|
||||
{"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_VARARGS},
|
||||
{"getExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_VARARGS},
|
||||
{"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_NOARGS},
|
||||
{"getExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_NOARGS},
|
||||
{"setExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_VARARGS},
|
||||
{NULL,NULL} //Sentinel
|
||||
};
|
||||
@@ -258,9 +258,7 @@ SCA_ILogicBrick::_getattr(const STR_String& attr)
|
||||
|
||||
|
||||
|
||||
PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self,
|
||||
PyObject* args,
|
||||
PyObject* kwds)
|
||||
PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self)
|
||||
{
|
||||
CValue* parent = GetParent();
|
||||
if (parent)
|
||||
@@ -294,9 +292,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self,
|
||||
|
||||
|
||||
|
||||
PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self,
|
||||
PyObject* args,
|
||||
PyObject* kwds)
|
||||
PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self)
|
||||
{
|
||||
return PyInt_FromLong(m_Execute_Ueber_Priority);
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ public:
|
||||
|
||||
// python methods
|
||||
|
||||
KX_PYMETHOD(SCA_ILogicBrick,GetOwner);
|
||||
KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetOwner);
|
||||
KX_PYMETHOD(SCA_ILogicBrick,SetExecutePriority);
|
||||
KX_PYMETHOD(SCA_ILogicBrick,GetExecutePriority);
|
||||
KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority);
|
||||
|
||||
enum KX_BOOL_TYPE {
|
||||
KX_BOOL_NODEF = 0,
|
||||
|
||||
@@ -118,7 +118,7 @@ void SCA_ISensor::Resume() {
|
||||
}
|
||||
|
||||
void SCA_ISensor::Init() {
|
||||
printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name);
|
||||
printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name.Ptr());
|
||||
}
|
||||
|
||||
void SCA_ISensor::DecLink() {
|
||||
|
||||
Reference in New Issue
Block a user