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-03 15:00:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-03 15:00:35 +0300
commite8c322ee8568b6fbe01625f047f7056aa00cd818 (patch)
treef8de1afc51aab2fc5df6718de48e7bf3b05c9082 /source/blender/python/intern/bpy_rna.h
parentc7dc8ddf7dae781d27535475cbf9ea397bf4edcf (diff)
Py/RNA API: WITH_PYTHON_SAFETY
compile time option which enables extra safety checks. since this is noticeably slower I rather not enable by default yet.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.h')
-rw-r--r--source/blender/python/intern/bpy_rna.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index b5da9bf91be..8705efb055a 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -29,23 +29,31 @@
#ifndef BPY_RNA_H
#define BPY_RNA_H
-
/* --- bpy build options --- */
+#ifdef WITH_PYTHON_SAFETY
+
/* 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
+#define USE_WEAKREFS
/* method to invalidate removed py data, XXX, slow to remove objects, otherwise no overhead */
-//#define USE_PYRNA_INVALIDATE_GC
+/* #define USE_PYRNA_INVALIDATE_GC */
/* different method */
-//#define USE_PYRNA_INVALIDATE_WEAKREF
+#define USE_PYRNA_INVALIDATE_WEAKREF
/* support for inter references, currently only needed for corner case */
-// #define USE_PYRNA_STRUCT_REFERENCE
+#define USE_PYRNA_STRUCT_REFERENCE
/* use real collection iterators rather then faking with a list */
#define USE_PYRNA_ITER
+#else /* WITH_PYTHON_SAFETY */
+
+ /* default, no defines! */
+
+#endif /* !WITH_PYTHON_SAFETY */
+
+
/* sanity checks on above defs */
#if defined(USE_PYRNA_INVALIDATE_WEAKREF) && !defined(USE_WEAKREFS)
#define USE_WEAKREFS