- use Py_CLEAR for python internally referencing other PyObjects (supposed to be...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 27 Feb 2011 04:01:58 +0000 (04:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 27 Feb 2011 04:01:58 +0000 (04:01 +0000)
- detect includes for qtcreator projects as well as the ones from cmake (it didnt return all of the right paths).

build_files/cmake/cmake_qtcreator_project.py
source/blender/editors/space_action/action_edit.c
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_Scene.cpp

index 55aa9a75a827e6c81cb3a303740b70382f8819f8..24e168f718f40815282070ff9c3ff00a9e63a014 100644 (file)
@@ -171,6 +171,11 @@ def main():
     else:
         includes, defines = cmake_advanced_info()
 
     else:
         includes, defines = cmake_advanced_info()
 
+        # for some reason it doesnt give all internal includes
+        includes = list(set(includes) | set(dirname(f) for f in files_rel if is_c_header(f)))
+        includes.sort()
+
+
         PROJECT_NAME = "Blender"
         f = open(join(base, "%s.files" % PROJECT_NAME), 'w')
         f.write("\n".join(files_rel))
         PROJECT_NAME = "Blender"
         f = open(join(base, "%s.files" % PROJECT_NAME), 'w')
         f.write("\n".join(files_rel))
index 4f7bddc5c4023d05ac12b28e389a7b5f000b0257..261a4f806d853970a47428438c736b643a4dff59 100644 (file)
@@ -167,7 +167,7 @@ static int act_markers_make_local_poll(bContext *C)
        return ED_markers_get_first_selected(ED_context_get_markers(C)) != NULL;
 }
 
        return ED_markers_get_first_selected(ED_context_get_markers(C)) != NULL;
 }
 
-static int act_markers_make_local_exec (bContext *C, wmOperator *op)
+static int act_markers_make_local_exec (bContext *C, wmOperator *UNUSED(op))
 {      
        ListBase *markers = ED_context_get_markers(C);
        
 {      
        ListBase *markers = ED_context_get_markers(C);
        
index 5ca780bb319b79c3ec95280510abd7d90d62bce2..93d67e92dd5a0e1a1464552cdee5f81590628118 100644 (file)
@@ -157,7 +157,8 @@ KX_GameObject::~KX_GameObject()
 #ifdef WITH_PYTHON
        if (m_attr_dict) {
                PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */
 #ifdef WITH_PYTHON
        if (m_attr_dict) {
                PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */
-               Py_DECREF(m_attr_dict);
+               /* Py_CLEAR: Py_DECREF's and NULL's */
+               Py_CLEAR(m_attr_dict);
        }
 #endif // WITH_PYTHON
 }
        }
 #endif // WITH_PYTHON
 }
index 0a8c3039ae3f6e07a9d75c688f5101c458079b73..4a379f46440ff951e1cb5d05bf65c064a9d3a596 100644 (file)
@@ -269,10 +269,12 @@ KX_Scene::~KX_Scene()
 
 #ifdef WITH_PYTHON
        PyDict_Clear(m_attr_dict);
 
 #ifdef WITH_PYTHON
        PyDict_Clear(m_attr_dict);
-       Py_DECREF(m_attr_dict);
+       /* Py_CLEAR: Py_DECREF's and NULL's */
+       Py_CLEAR(m_attr_dict);
 
 
-       Py_XDECREF(m_draw_call_pre);
-       Py_XDECREF(m_draw_call_post);
+       /* these may be NULL but the macro checks */
+       Py_CLEAR(m_draw_call_pre);
+       Py_CLEAR(m_draw_call_post);
 #endif
 }
 
 #endif
 }