svn merge -r 21041:21301 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / gameengine / GameLogic / SCA_ILogicBrick.cpp
index 2dc80f54568560466434a2e0b3f37e323222c134..ccb79a2d49fd147727262afaafed451f8f6268df 100644 (file)
 
 SCA_LogicManager* SCA_ILogicBrick::m_sCurrentLogicManager = NULL;
 
-SCA_ILogicBrick::SCA_ILogicBrick(SCA_IObject* gameobj,
-                                                                PyTypeObject* T)
+SCA_ILogicBrick::SCA_ILogicBrick(SCA_IObject* gameobj)
        :
-       CValue(T),
+       CValue(),
        m_gameobj(gameobj),
        m_Execute_Priority(0),
        m_Execute_Ueber_Priority(0),
@@ -194,23 +193,17 @@ PyTypeObject SCA_ILogicBrick::Type = {
        0,
        0,
        py_base_repr,
-       0,0,0,0,0,0,
-       py_base_getattro,
-       py_base_setattro,
        0,0,0,0,0,0,0,0,0,
-       Methods
-};
-
-
-
-PyParentObject SCA_ILogicBrick::Parents[] = {
-       &SCA_ILogicBrick::Type,
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+       0,0,0,0,0,0,0,
+       Methods,
+       0,
+       0,
        &CValue::Type,
-       NULL
+       0,0,0,0,0,0,
+       py_base_new
 };
 
-
-
 PyMethodDef SCA_ILogicBrick::Methods[] = {
        // --> Deprecated
   {"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_NOARGS},
@@ -245,21 +238,6 @@ int SCA_ILogicBrick::CheckProperty(void *self, const PyAttributeDef *attrdef)
        return 0;
 }
 
-PyObject* SCA_ILogicBrick::py_getattro(PyObject *attr)
-{
-  py_getattro_up(CValue);
-}
-
-PyObject* SCA_ILogicBrick::py_getattro_dict() {
-       py_getattro_dict_up(CValue);
-}
-
-int SCA_ILogicBrick::py_setattro(PyObject *attr, PyObject *value)
-{
-       py_setattro_up(CValue);
-}
-
-
 PyObject* SCA_ILogicBrick::PyGetOwner()
 {
        ShowDeprecationWarning("getOwner()", "the owner property");
@@ -296,7 +274,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* args)
 PyObject* SCA_ILogicBrick::PyGetExecutePriority()
 {
        ShowDeprecationWarning("getExecutePriority()", "the executePriority property");
-       return PyInt_FromLong(m_Execute_Priority);
+       return PyLong_FromSsize_t(m_Execute_Priority);
 }
 
 
@@ -326,5 +304,5 @@ bool SCA_ILogicBrick::PyArgToBool(int boolArg)
 
 PyObject* SCA_ILogicBrick::BoolToPyArg(bool boolarg)
 {
-       return PyInt_FromLong(boolarg? KX_TRUE: KX_FALSE);      
+       return PyLong_FromSsize_t(boolarg? KX_TRUE: KX_FALSE);  
 }