Merge branch 'master' into blender2.8
[blender.git] / source / blender / python / intern / bpy_interface.c
index 20cfd364a0cf1014063acfbb95aa45d11398c154..c6337f2ac28b1685a142a6da84e6b493785e9793 100644 (file)
@@ -530,7 +530,8 @@ static bool python_script_exec(
 
        if (py_dict) {
 #ifdef PYMODULE_CLEAR_WORKAROUND
-               PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItemString(PyThreadState_GET()->interp->modules, "__main__");
+               PyModuleObject *mmod = (PyModuleObject *)PyDict_GetItem(
+                       PyThreadState_GET()->interp->modules, bpy_intern_str___main__);
                PyObject *dict_back = mmod->md_dict;
                /* freeing the module will clear the namespace,
                 * gives problems running classes defined in this namespace being used later. */