BGE Python API

Use 'const char *' rather then the C++ 'STR_String' type for the attribute identifier of python attributes.

Each attribute and method access from python was allocating and freeing the string.
A simple test with getting an attribute a loop shows this speeds up attribute lookups a bit over 2x.
This commit is contained in:
2009-02-19 13:42:07 +00:00
parent c597863783
commit cdec2b3d15
127 changed files with 392 additions and 403 deletions

View File

@@ -59,7 +59,7 @@ public:
bool CheckEqual(CValue* first,CValue* second);
virtual PyObject* _getattr(const STR_String& attr);
virtual PyObject* _getattr(const char *attr);
KX_PYMETHOD(CListValue,append);
KX_PYMETHOD(CListValue,reverse);