diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-14 08:51:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-14 08:51:56 +0300 |
commit | cca57bf04c9b84da742743343077db9b3f6f7025 (patch) | |
tree | 0752000a7ff521caa93fe5b2729d9d6158894fb1 /source/blender/python/intern | |
parent | 06908955c3fe9948fff8a1cc195ce90b8d284431 (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.c | 4 |
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; } |