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>2016-07-14 08:51:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-14 08:51:56 +0300
commitcca57bf04c9b84da742743343077db9b3f6f7025 (patch)
tree0752000a7ff521caa93fe5b2729d9d6158894fb1 /source/blender/python/intern
parent06908955c3fe9948fff8a1cc195ce90b8d284431 (diff)
PyAPI: Use module names on initializaton
No need to re-convert from C strings to PyUnicode.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/gpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c
index c3bb588f7eb..50dd4618166 100644
--- a/source/blender/python/intern/gpu.c
+++ b/source/blender/python/intern/gpu.c
@@ -330,10 +330,10 @@ PyObject *GPU_initPython(void)
/* gpu.offscreen */
PyModule_AddObject(module, "offscreen", (submodule = BPyInit_gpu_offscreen()));
- PyDict_SetItemString(sys_modules, PyModule_GetName(submodule), submodule);
+ PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
Py_INCREF(submodule);
- PyDict_SetItemString(PyImport_GetModuleDict(), "gpu", module);
+ PyDict_SetItem(PyImport_GetModuleDict(), PyModule_GetNameObject(module), module);
return module;
}