[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35212] trunk/blender: - use Py_CLEAR for python internally referencing other PyObjects ( supposed to be safer).
Campbell Barton
ideasman42 at gmail.com
Sun Feb 27 05:01:59 CET 2011
Revision: 35212
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35212
Author: campbellbarton
Date: 2011-02-27 04:01:58 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
- use Py_CLEAR for python internally referencing other PyObjects (supposed to be safer).
- detect includes for qtcreator projects as well as the ones from cmake (it didnt return all of the right paths).
Modified Paths:
--------------
trunk/blender/build_files/cmake/cmake_qtcreator_project.py
trunk/blender/source/blender/editors/space_action/action_edit.c
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
Modified: trunk/blender/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-02-27 03:59:17 UTC (rev 35211)
+++ trunk/blender/build_files/cmake/cmake_qtcreator_project.py 2011-02-27 04:01:58 UTC (rev 35212)
@@ -171,6 +171,11 @@
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))
Modified: trunk/blender/source/blender/editors/space_action/action_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/action_edit.c 2011-02-27 03:59:17 UTC (rev 35211)
+++ trunk/blender/source/blender/editors/space_action/action_edit.c 2011-02-27 04:01:58 UTC (rev 35212)
@@ -167,7 +167,7 @@
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);
Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp 2011-02-27 03:59:17 UTC (rev 35211)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp 2011-02-27 04:01:58 UTC (rev 35212)
@@ -157,7 +157,8 @@
#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
}
Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2011-02-27 03:59:17 UTC (rev 35211)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp 2011-02-27 04:01:58 UTC (rev 35212)
@@ -269,10 +269,12 @@
#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
}
More information about the Bf-blender-cvs
mailing list