diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-02-23 09:41:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-02-23 09:41:10 +0300 |
commit | 5488175d0bc79b07fd3fb0f279323b4f33487b5f (patch) | |
tree | 2ec81f5875731025dfe3cb5102b29d36a9360538 /source/gameengine/Expressions/ListValue.h | |
parent | 1c088b454d21bfd55119110fa1dc01d9543c35f8 (diff) |
BGE Python API
* fixed segfaults in CListValue.index(val) and CListValue.count(val) when the pyTypes could not be converted into a CValue.
* added scene.objects to replace scene.getObjectList()
* added function names to PyArg_ParseTuple() so errors will include the function names
* removed cases of PyArg_ParseTuple(args,"O",&pyobj) where METH_O ensures a single argument.
* Made PyObjectFrom use ugly python api rather then Py_BuildValue(), approx %40 speedup for functions that return Python vector and matrix types like ob.orientation.
Diffstat (limited to 'source/gameengine/Expressions/ListValue.h')
-rw-r--r-- | source/gameengine/Expressions/ListValue.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 8c0bd767938..104e3e63283 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -61,10 +61,10 @@ public: virtual PyObject* _getattr(const char *attr); - KX_PYMETHOD(CListValue,append); - KX_PYMETHOD(CListValue,reverse); - KX_PYMETHOD(CListValue,index); - KX_PYMETHOD(CListValue,count); + KX_PYMETHOD_O(CListValue,append); + KX_PYMETHOD_NOARGS(CListValue,reverse); + KX_PYMETHOD_O(CListValue,index); + KX_PYMETHOD_O(CListValue,count); private: |