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>2019-02-23 10:29:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-23 11:20:20 +0300
commit7a5854f4ce3e70b0ec6b18a688c79808d4110ff9 (patch)
tree8bb20650659360823349385a23baee68b45a82cc
parent6ab634ccc477fb704fce45663f170e500d5694b8 (diff)
Cleanup: quiet undeclared variable warning
Move bpy_context_module declaration to bpy_rna.h.
-rw-r--r--source/blender/python/intern/bpy.c1
-rw-r--r--source/blender/python/intern/bpy_interface.c1
-rw-r--r--source/blender/python/intern/bpy_props.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c2
-rw-r--r--source/blender/python/intern/bpy_rna.h2
5 files changed, 4 insertions, 4 deletions
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