rename and negate DISABLE_PYTHON --> WITH_PYTHON
[blender.git] / source / gameengine / Expressions / ListValue.h
index cf2976c2bbbd8314597c4b4c362febc819460d63..ff675dd0e68b81094f8d0d932640dbf0acdcfcb8 100644 (file)
@@ -24,7 +24,7 @@ class CListValue : public CPropValue
        //PLUGIN_DECLARE_SERIAL (CListValue,CValue)
 
 public:
-       CListValue(PyTypeObject *T = &Type);
+       CListValue();
        virtual ~CListValue();
 
        void AddConfigurationData(CValue* menuvalue);
@@ -46,6 +46,7 @@ public:
        bool SearchValue(CValue* val);
        
        CValue* FindValue(const STR_String & name);
+       CValue* FindValue(const char *name);
 
        void ReleaseAndRemoveAll();
        virtual void SetModified(bool bModified);
@@ -59,11 +60,13 @@ public:
 
        bool CheckEqual(CValue* first,CValue* second);
 
-       virtual PyObject* py_getattro(PyObject* attr);
+#ifdef WITH_PYTHON
        virtual PyObject* py_repr(void) {
-               PyObject *py_list= PySequence_List((PyObject *)this);
+               PyObject *py_proxy= this->GetProxy();
+               PyObject *py_list= PySequence_List(py_proxy);
                PyObject *py_string= PyObject_Repr(py_list);
                Py_DECREF(py_list);
+               Py_DECREF(py_proxy);
                return py_string;
        }
 
@@ -71,8 +74,9 @@ public:
        KX_PYMETHOD_NOARGS(CListValue,reverse);
        KX_PYMETHOD_O(CListValue,index);
        KX_PYMETHOD_O(CListValue,count);
+       KX_PYMETHOD_VARARGS(CListValue,get);
        KX_PYMETHOD_O(CListValue,from_id);
-
+#endif
        
 private: