no functional changes
authorCampbell Barton <ideasman42@gmail.com>
Sun, 16 May 2010 10:09:07 +0000 (10:09 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 16 May 2010 10:09:07 +0000 (10:09 +0000)
- add PySequenceMethods members (all NULL)
- spaces -> tabs
- cmake syntax warning from recent ghost commit

12 files changed:
intern/ghost/CMakeLists.txt
source/blender/python/generic/bgl.c
source/blender/python/generic/mathutils_color.c
source/blender/python/generic/mathutils_euler.c
source/blender/python/generic/mathutils_matrix.c
source/blender/python/generic/mathutils_quat.c
source/blender/python/generic/mathutils_vector.c
source/blender/python/intern/bpy_rna.c
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp
source/gameengine/Ketsji/KX_Scene.cpp

index 9b0511f..fa630ce 100644 (file)
@@ -84,7 +84,7 @@ ELSEIF(UNIX)
                ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp
                ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp
        )
-ENDIF(UNIX)
+ENDIF(APPLE)
 
 BLENDERLIB(bf_ghost "${SRC}" "${INC}")
 
index 63c518c..806b5a5 100644 (file)
@@ -64,13 +64,16 @@ static int Buffer_ass_slice( PyObject * self, int begin, int end,
                                 PyObject * seq );
 
 static PySequenceMethods Buffer_SeqMethods = {
-       ( lenfunc ) Buffer_len, /*sq_length */
-       ( binaryfunc ) 0,       /*sq_concat */
-       ( ssizeargfunc ) 0,     /*sq_repeat */
-       ( ssizeargfunc ) Buffer_item,   /*sq_item */
-       ( ssizessizeargfunc ) Buffer_slice,     /*sq_slice */
-       ( ssizeobjargproc ) Buffer_ass_item,    /*sq_ass_item */
-       ( ssizessizeobjargproc ) Buffer_ass_slice,      /*sq_ass_slice */
+       ( lenfunc ) Buffer_len,                                         /*sq_length */
+       ( binaryfunc ) NULL,                                            /*sq_concat */
+       ( ssizeargfunc ) NULL,                                          /*sq_repeat */
+       ( ssizeargfunc ) Buffer_item,                           /*sq_item */
+       ( ssizessizeargfunc ) Buffer_slice,                     /*sq_slice, deprecated TODO, replace */
+       ( ssizeobjargproc ) Buffer_ass_item,            /*sq_ass_item */
+       ( ssizessizeobjargproc ) Buffer_ass_slice,      /*sq_ass_slice, deprecated TODO, replace */
+       (objobjproc) NULL,                                                      /* sq_contains */
+       (binaryfunc) NULL,                                                      /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                                            /* sq_inplace_repeat */
 };
 
 static void Buffer_dealloc( PyObject * self );
index 34c8dd8..5acd030 100644 (file)
@@ -326,12 +326,15 @@ static int Color_ass_subscript(ColorObject *self, PyObject *item, PyObject *valu
 //-----------------PROTCOL DECLARATIONS--------------------------
 static PySequenceMethods Color_SeqMethods = {
        (lenfunc) Color_len,                                    /* sq_length */
-       (binaryfunc) 0,                                                 /* sq_concat */
-       (ssizeargfunc) 0,                                               /* sq_repeat */
+       (binaryfunc) NULL,                                              /* sq_concat */
+       (ssizeargfunc) NULL,                                    /* sq_repeat */
        (ssizeargfunc) Color_item,                              /* sq_item */
        (ssizessizeargfunc) NULL,                               /* sq_slice, deprecated */
        (ssizeobjargproc) Color_ass_item,               /* sq_ass_item */
        (ssizessizeobjargproc) NULL,                    /* sq_ass_slice, deprecated */
+       (objobjproc) NULL,                                              /* sq_contains */
+       (binaryfunc) NULL,                                              /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                                    /* sq_inplace_repeat */
 };
 
 static PyMappingMethods Color_AsMapping = {
index 3bda1b3..aac6504 100644 (file)
@@ -557,12 +557,15 @@ static int Euler_ass_subscript(EulerObject *self, PyObject *item, PyObject *valu
 //-----------------PROTCOL DECLARATIONS--------------------------
 static PySequenceMethods Euler_SeqMethods = {
        (lenfunc) Euler_len,                                    /* sq_length */
-       (binaryfunc) 0,                                                 /* sq_concat */
-       (ssizeargfunc) 0,                                               /* sq_repeat */
+       (binaryfunc) NULL,                                              /* sq_concat */
+       (ssizeargfunc) NULL,                                    /* sq_repeat */
        (ssizeargfunc) Euler_item,                              /* sq_item */
        (ssizessizeargfunc) NULL,                               /* sq_slice, deprecated  */
        (ssizeobjargproc) Euler_ass_item,               /* sq_ass_item */
        (ssizessizeobjargproc) NULL,                    /* sq_ass_slice, deprecated */
+       (objobjproc) NULL,                                              /* sq_contains */
+       (binaryfunc) NULL,                                              /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                                    /* sq_inplace_repeat */
 };
 
 static PyMappingMethods Euler_AsMapping = {
index 8bb46d8..a211386 100644 (file)
@@ -1126,13 +1126,16 @@ static PyObject* Matrix_inv(MatrixObject *self)
 
 /*-----------------PROTOCOL DECLARATIONS--------------------------*/
 static PySequenceMethods Matrix_SeqMethods = {
-       (lenfunc) Matrix_len,                                   /* sq_length */
-       (binaryfunc) 0,                                                 /* sq_concat */
-       (ssizeargfunc) 0,                                                       /* sq_repeat */
-       (ssizeargfunc) Matrix_item,                             /* sq_item */
-       (ssizessizeargfunc) Matrix_slice,                       /* sq_slice */
-       (ssizeobjargproc) Matrix_ass_item,              /* sq_ass_item */
-       (ssizessizeobjargproc) Matrix_ass_slice,        /* sq_ass_slice */
+       (lenfunc) Matrix_len,                                           /* sq_length */
+       (binaryfunc) NULL,                                                      /* sq_concat */
+       (ssizeargfunc) NULL,                                            /* sq_repeat */
+       (ssizeargfunc) Matrix_item,                                     /* sq_item */
+       (ssizessizeargfunc) Matrix_slice,                       /* sq_slice, deprecated TODO, replace */
+       (ssizeobjargproc) Matrix_ass_item,                      /* sq_ass_item */
+       (ssizessizeobjargproc) Matrix_ass_slice,        /* sq_ass_slice, deprecated TODO, replace */
+       (objobjproc) NULL,                                                      /* sq_contains */
+       (binaryfunc) NULL,                                                      /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                                            /* sq_inplace_repeat */
 };
 
 
index c39e6ee..f94e5e2 100644 (file)
@@ -707,13 +707,16 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2)
 
 //-----------------PROTOCOL DECLARATIONS--------------------------
 static PySequenceMethods Quaternion_SeqMethods = {
-       (lenfunc) Quaternion_len,                                       /* sq_length */
-       (binaryfunc) 0,                                                         /* sq_concat */
-       (ssizeargfunc) 0,                                                               /* sq_repeat */
-       (ssizeargfunc) Quaternion_item,                         /* sq_item */
-       (ssizessizeargfunc) NULL,                       /* sq_slice, deprecated */
-       (ssizeobjargproc) Quaternion_ass_item,          /* sq_ass_item */
-       (ssizessizeobjargproc) NULL,    /* sq_ass_slice, deprecated */
+       (lenfunc) Quaternion_len,                               /* sq_length */
+       (binaryfunc) NULL,                                              /* sq_concat */
+       (ssizeargfunc) NULL,                                    /* sq_repeat */
+       (ssizeargfunc) Quaternion_item,                 /* sq_item */
+       (ssizessizeargfunc) NULL,                               /* sq_slice, deprecated */
+       (ssizeobjargproc) Quaternion_ass_item,  /* sq_ass_item */
+       (ssizessizeobjargproc) NULL,                    /* sq_ass_slice, deprecated */
+       (objobjproc) NULL,                                              /* sq_contains */
+       (binaryfunc) NULL,                                              /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                                    /* sq_inplace_repeat */
 };
 
 static PyMappingMethods Quaternion_AsMapping = {
index c9e1511..113c849 100644 (file)
@@ -1258,13 +1258,16 @@ static PyObject* Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa
 
 /*-----------------PROTCOL DECLARATIONS--------------------------*/
 static PySequenceMethods Vector_SeqMethods = {
-       (lenfunc) Vector_len,                                           /* sq_length */
-       (binaryfunc) 0,                                                         /* sq_concat */
-       (ssizeargfunc) 0,                                                       /* sq_repeat */
-       (ssizeargfunc) Vector_item,                                     /* sq_item */
-       NULL,                                                                           /* py3 deprecated slice func */
-       (ssizeobjargproc) Vector_ass_item,                      /* sq_ass_item */
-       NULL,                                                                           /* py3 deprecated slice assign func */
+       (lenfunc) Vector_len,                           /* sq_length */
+       (binaryfunc) 0,                                         /* sq_concat */
+       (ssizeargfunc) 0,                                       /* sq_repeat */
+       (ssizeargfunc) Vector_item,                     /* sq_item */
+       NULL,                                                           /* py3 deprecated slice func */
+       (ssizeobjargproc) Vector_ass_item,      /* sq_ass_item */
+       NULL,                                                           /* py3 deprecated slice assign func */
+       (objobjproc) NULL,                                      /* sq_contains */
+       (binaryfunc) NULL,                                      /* sq_inplace_concat */
+       (ssizeargfunc) NULL,                            /* sq_inplace_repeat */
 };
 
 static PyObject *Vector_subscript(VectorObject* self, PyObject* item)
index f047ca7..3aed5a8 100644 (file)
@@ -1194,17 +1194,17 @@ static Py_ssize_t pyrna_prop_collection_length( BPy_PropertyRNA *self )
 static PyObject *pyrna_prop_collection_subscript_int(BPy_PropertyRNA *self, Py_ssize_t keynum)
 {
        PointerRNA newptr;
-    int len= RNA_property_collection_length(&self->ptr, self->prop);
+       int len= RNA_property_collection_length(&self->ptr, self->prop);
 
        if(keynum < 0) keynum += len;
 
-    if(keynum >= 0 && keynum < len)  {
-        if(RNA_property_collection_lookup_int(&self->ptr, self->prop, keynum, &newptr)) {
-            return pyrna_struct_CreatePyObject(&newptr);
-        }        
-        PyErr_Format(PyExc_IndexError, "bpy_prop_collection[index]: index %d could not be found", keynum);
-        return NULL;
-    }
+       if(keynum >= 0 && keynum < len)  {
+               if(RNA_property_collection_lookup_int(&self->ptr, self->prop, keynum, &newptr)) {
+                       return pyrna_struct_CreatePyObject(&newptr);
+               }
+               PyErr_Format(PyExc_IndexError, "bpy_prop_collection[index]: index %d could not be found", keynum);
+               return NULL;
+       }
        PyErr_Format(PyExc_IndexError, "bpy_prop_collection[index]: index %d out of range", keynum);
        return NULL;
 }
@@ -1637,6 +1637,8 @@ static PySequenceMethods pyrna_prop_array_as_sequence = {
        (ssizeobjargproc)prop_subscript_ass_array_int,          /* sq_ass_item */
        NULL,           /* *was* sq_ass_slice */
        (objobjproc)pyrna_prop_array_contains,  /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 static PySequenceMethods pyrna_prop_collection_as_sequence = {
@@ -1648,6 +1650,8 @@ static PySequenceMethods pyrna_prop_collection_as_sequence = {
        NULL,           /* sq_ass_item */
        NULL,           /* *was* sq_ass_slice */
        (objobjproc)pyrna_prop_collection_contains,     /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 static PySequenceMethods pyrna_struct_as_sequence = {
@@ -1659,6 +1663,8 @@ static PySequenceMethods pyrna_struct_as_sequence = {
        NULL,           /* sq_ass_item */
        NULL,           /* *was* sq_ass_slice */
        (objobjproc)pyrna_struct_contains,      /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 static PyObject *pyrna_struct_subscript( BPy_StructRNA *self, PyObject *key )
@@ -1886,7 +1892,7 @@ static PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *arg
        char *path_full= NULL;
        int index= -1;
        float cfra= FLT_MAX;
-    char *group_name= NULL;
+       char *group_name= NULL;
 
        if(pyrna_struct_keyframe_parse(&self->ptr, args, kw, "s|ifs:bpy_struct.keyframe_insert()", "bpy_struct.keyframe_insert()", &path_full, &index, &cfra, &group_name) == -1)
                return NULL;
@@ -1920,7 +1926,7 @@ static PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *arg
        char *path_full= NULL;
        int index= -1;
        float cfra= FLT_MAX;
-    char *group_name= NULL;
+       char *group_name= NULL;
 
        if(pyrna_struct_keyframe_parse(&self->ptr, args, kw, "s|ifs:bpy_struct.keyframe_delete()", "bpy_struct.keyframe_insert()", &path_full, &index, &cfra, &group_name) == -1)
                return NULL;
@@ -3550,7 +3556,7 @@ PyTypeObject pyrna_prop_Type = {
        0,                      /* tp_itemsize */
        /* methods */
        NULL,                                           /* tp_dealloc */
-       NULL,                       /* printfunc tp_print; */
+       NULL,                   /* printfunc tp_print; */
        NULL,                                           /* getattrfunc tp_getattr; */
        NULL,                       /* setattrfunc tp_setattr; */
        NULL,                                           /* tp_compare */ /* DEPRECATED in python 3.0! */
index 75aff67..4d9d82e 100644 (file)
@@ -362,8 +362,8 @@ PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihig
 
        if (ihigh >= n)
                ihigh = n;
-    if (ihigh < ilow)
-        ihigh = ilow;
+       if (ihigh < ilow)
+               ihigh = ilow;
 
        newlist = PyList_New(ihigh - ilow);
        if (!newlist)
@@ -491,6 +491,8 @@ static  PySequenceMethods listvalue_as_sequence = {
        NULL, /*sq_ass_item*/
        NULL, /*sq_ass_slice*/
        (objobjproc)listvalue_buffer_contains,  /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 
index 11caa9c..abc597a 100644 (file)
@@ -1739,6 +1739,8 @@ PySequenceMethods KX_GameObject::Sequence = {
        NULL,           /* sq_ass_item */
        NULL,           /* sq_ass_slice */
        (objobjproc)Seq_Contains,       /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 PyTypeObject KX_GameObject::Type = {
@@ -2733,7 +2735,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
        KX_RayCast::Callback<KX_GameObject> callback(this,spc);
        KX_RayCast::RayTest(pe, fromPoint, toPoint, callback);
 
-    if (m_pHitObject)
+       if (m_pHitObject)
                return m_pHitObject->GetProxy();
        
        Py_RETURN_NONE;
index f28c951..8ffd58a 100644 (file)
@@ -324,6 +324,8 @@ PySequenceMethods KX_PythonSeq_as_sequence = {
        NULL,           /* sq_ass_item */
        NULL,           /* sq_ass_slice */
        (objobjproc)KX_PythonSeq_contains,      /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 static PyMappingMethods KX_PythonSeq_as_mapping = {
index f805b69..ebd0fa5 100644 (file)
@@ -962,8 +962,8 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj)
        {
                m_logicmgr->RemoveSensor(*its);
        }
-       
-    SCA_ControllerList& controllers = newobj->GetControllers();
+
+       SCA_ControllerList& controllers = newobj->GetControllers();
        for (SCA_ControllerList::iterator itc = controllers.begin();
                 !(itc==controllers.end());itc++)
        {
@@ -1999,6 +1999,8 @@ PySequenceMethods KX_Scene::Sequence = {
        NULL,           /* sq_ass_item */
        NULL,           /* sq_ass_slice */
        (objobjproc)Seq_Contains,       /* sq_contains */
+       (binaryfunc) NULL, /* sq_inplace_concat */
+       (ssizeargfunc) NULL, /* sq_inplace_repeat */
 };
 
 PyObject* KX_Scene::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)