From 7a5854f4ce3e70b0ec6b18a688c79808d4110ff9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 23 Feb 2019 18:29:03 +1100 Subject: Cleanup: quiet undeclared variable warning Move bpy_context_module declaration to bpy_rna.h. --- source/blender/python/intern/bpy.c | 1 - source/blender/python/intern/bpy_interface.c | 1 - source/blender/python/intern/bpy_props.c | 2 -- source/blender/python/intern/bpy_rna.c | 2 ++ source/blender/python/intern/bpy_rna.h | 2 ++ 5 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 9af842a4b2e..05b471c4db7 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -294,7 +294,6 @@ static PyObject *bpy_import_test(const char *modname) ******************************************************************************/ void BPy_init_modules(void) { - extern BPy_StructRNA *bpy_context_module; PointerRNA ctx_ptr; PyObject *mod; diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 7b8f52197fb..2a33c316f55 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -81,7 +81,6 @@ CLG_LOGREF_DECLARE_GLOBAL(BPY_LOG_RNA, "bpy.rna"); /* in case a python script triggers another python call, stop bpy_context_clear from invalidating */ static int py_call_level = 0; -BPy_StructRNA *bpy_context_module = NULL; /* for fast access */ // #define TIME_PY_RUN // simple python tests. prints on exit. diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index 79b2e356713..c3c891ff6fc 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -52,8 +52,6 @@ enum { BPY_DATA_CB_SLOT_SIZE = 4, }; -extern BPy_StructRNA *bpy_context_module; - static const EnumPropertyItem property_flag_items[] = { {PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""}, {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""}, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 31c5600ff8f..cba6d2203fa 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -78,6 +78,8 @@ #define USE_MATHUTILS #define USE_STRING_COERCE +BPy_StructRNA *bpy_context_module = NULL; /* for fast access */ + static PyObject *pyrna_struct_Subtype(PointerRNA *ptr); static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self); diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index 5de7704c3ab..c4c6944d46d 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -223,4 +223,6 @@ extern PyMethodDef meth_bpy_unregister_class; extern PyMethodDef meth_bpy_owner_id_set; extern PyMethodDef meth_bpy_owner_id_get; +extern BPy_StructRNA *bpy_context_module; + #endif -- cgit v1.2.3