Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-01 12:02:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-01 12:02:54 +0300
commitc9ee017fb52bf68df87fa498555f1df735b46131 (patch)
tree7e83b9dc127ea9d0c7eff3e414a873e0073a5a45 /source/blender/python/intern/bpy_rna.h
parentc8de6195c84caaa9abeb968047512fe8795d16c1 (diff)
Py/RNA API test code to prevent crashing blender when python references freed ID's.
This uses pythons GC so its no overhead during runtime but makes removing ID's slower. Commented definition 'USE_PYRNA_INVALIDATE_GC' for now, so no functional change.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r--source/blender/python/intern/bpy_rna.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index fe30529f680..8d9fabf5627 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -44,6 +44,9 @@ extern PyTypeObject pyrna_prop_collection_Type;
#define BPy_PropertyRNA_Check(v) (PyObject_TypeCheck(v, &pyrna_prop_Type))
#define BPy_PropertyRNA_CheckExact(v) (Py_TYPE(v) == &pyrna_prop_Type)
+/* method to invalidate removed py data, XXX, slow to remove objects, otherwise no overhead */
+// #define USE_PYRNA_INVALIDATE_GC
+
/* play it safe and keep optional for now, need to test further now this affects looping on 10000's of verts for eg. */
// #define USE_WEAKREFS