Cleanup: quiet undeclared variable warning

Move bpy_context_module declaration to bpy_rna.h.
This commit is contained in:
2019-02-23 18:29:03 +11:00
parent 6ab634ccc4
commit 7a5854f4ce
5 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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.

View File

@@ -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", ""},

View File

@@ -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);

View File

@@ -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