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>2020-08-17 11:48:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-17 11:53:21 +0300
commit3d47da9e4c4e492d35ab6f63391d5692ccd7aabc (patch)
treef7c5dc169be5f7a9b6e761ebfac13e2ca3cfa6a2 /source/blender/python/intern
parent6b5582c7f7b9f11b70d1d33bfd8e8de9429d75c3 (diff)
Fix error in recent bpy_interface.c split (missed moving define)
Error in 7341ceb674b2f, this missed moving a local-define when splitting.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_interface.c12
-rw-r--r--source/blender/python/intern/bpy_interface_run.c13
2 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 3941d25e9f7..b0b36baa839 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -444,18 +444,6 @@ void BPY_python_backtrace(FILE *fp)
}
}
-/* super annoying, undo _PyModule_Clear(), bug [#23871] */
-#define PYMODULE_CLEAR_WORKAROUND
-
-#ifdef PYMODULE_CLEAR_WORKAROUND
-/* bad!, we should never do this, but currently only safe way I could find to keep namespace.
- * from being cleared. - campbell */
-typedef struct {
- PyObject_HEAD PyObject *md_dict;
- /* omit other values, we only want the dict. */
-} PyModuleObject;
-#endif
-
void BPY_DECREF(void *pyob_ptr)
{
PyGILState_STATE gilstate = PyGILState_Ensure();
diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c
index 9f9382b633c..a7593ae7d79 100644
--- a/source/blender/python/intern/bpy_interface_run.c
+++ b/source/blender/python/intern/bpy_interface_run.c
@@ -39,6 +39,7 @@
#include "BPY_extern_run.h"
#include "bpy_capi_utils.h"
+#include "bpy_intern_string.h"
#include "bpy_traceback.h"
#include "../generic/py_capi_utils.h"
@@ -65,6 +66,18 @@ static void bpy_text_filename_get(char *fn, const Main *bmain, size_t fn_len, co
BLI_snprintf(fn, fn_len, "%s%c%s", ID_BLEND_PATH(bmain, &text->id), SEP, text->id.name + 2);
}
+/* Very annoying! Undo #_PyModule_Clear(), see T23871. */
+#define PYMODULE_CLEAR_WORKAROUND
+
+#ifdef PYMODULE_CLEAR_WORKAROUND
+/* bad!, we should never do this, but currently only safe way I could find to keep namespace.
+ * from being cleared. - campbell */
+typedef struct {
+ PyObject_HEAD PyObject *md_dict;
+ /* omit other values, we only want the dict. */
+} PyModuleObject;
+#endif
+
static bool python_script_exec(
bContext *C, const char *fn, struct Text *text, struct ReportList *reports, const bool do_jump)
{