From ed817d62bd087686112fe4428ad47bd237dbef46 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 11 Feb 2021 13:53:20 -0300 Subject: Cleanup: Python GPU: Use consistent prefixes for local API It was not following the own documentation at the top code that mentions that for local API the prefix is "bpygpu_". --- source/blender/python/gpu/gpu_py_api.c | 8 ++++---- source/blender/python/gpu/gpu_py_matrix.c | 6 +++--- source/blender/python/gpu/gpu_py_matrix.h | 2 +- source/blender/python/gpu/gpu_py_select.c | 6 +++--- source/blender/python/gpu/gpu_py_select.h | 2 +- source/blender/python/gpu/gpu_py_shader.c | 6 +++--- source/blender/python/gpu/gpu_py_shader.h | 2 +- source/blender/python/gpu/gpu_py_types.c | 6 +++--- source/blender/python/gpu/gpu_py_types.h | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c index 33130291162..954118ffa5f 100644 --- a/source/blender/python/gpu/gpu_py_api.c +++ b/source/blender/python/gpu/gpu_py_api.c @@ -122,16 +122,16 @@ PyObject *BPyInit_gpu(void) mod = PyModule_Create(&GPU_module_def); - PyModule_AddObject(mod, "types", (submodule = BPyInit_gpu_types())); + PyModule_AddObject(mod, "types", (submodule = bpygpu_types_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - PyModule_AddObject(mod, "matrix", (submodule = BPyInit_gpu_matrix())); + PyModule_AddObject(mod, "matrix", (submodule = bpygpu_matrix_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - PyModule_AddObject(mod, "select", (submodule = BPyInit_gpu_select())); + PyModule_AddObject(mod, "select", (submodule = bpygpu_select_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - PyModule_AddObject(mod, "shader", (submodule = BPyInit_gpu_shader())); + PyModule_AddObject(mod, "shader", (submodule = bpygpu_shader_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); return mod; diff --git a/source/blender/python/gpu/gpu_py_matrix.c b/source/blender/python/gpu/gpu_py_matrix.c index a479f270770..05e0a416b94 100644 --- a/source/blender/python/gpu/gpu_py_matrix.c +++ b/source/blender/python/gpu/gpu_py_matrix.c @@ -537,18 +537,18 @@ static struct PyMethodDef py_matrix_methods[] = { }; PyDoc_STRVAR(py_matrix_doc, "This module provides access to the matrix stack."); -static PyModuleDef BPyGPU_matrix_module_def = { +static PyModuleDef py_matrix_module_def = { PyModuleDef_HEAD_INIT, .m_name = "gpu.matrix", .m_doc = py_matrix_doc, .m_methods = py_matrix_methods, }; -PyObject *BPyInit_gpu_matrix(void) +PyObject *bpygpu_matrix_init(void) { PyObject *submodule; - submodule = PyModule_Create(&BPyGPU_matrix_module_def); + submodule = PyModule_Create(&py_matrix_module_def); if (PyType_Ready(&BPyGPU_matrix_stack_context_Type) < 0) { return NULL; diff --git a/source/blender/python/gpu/gpu_py_matrix.h b/source/blender/python/gpu/gpu_py_matrix.h index 38a7f398b30..6af687f60ed 100644 --- a/source/blender/python/gpu/gpu_py_matrix.h +++ b/source/blender/python/gpu/gpu_py_matrix.h @@ -20,4 +20,4 @@ #pragma once -PyObject *BPyInit_gpu_matrix(void); +PyObject *bpygpu_matrix_init(void); diff --git a/source/blender/python/gpu/gpu_py_select.c b/source/blender/python/gpu/gpu_py_select.c index 4fa9d5ebc7a..e92ef9f7504 100644 --- a/source/blender/python/gpu/gpu_py_select.c +++ b/source/blender/python/gpu/gpu_py_select.c @@ -69,18 +69,18 @@ static struct PyMethodDef py_select_methods[] = { }; PyDoc_STRVAR(py_select_doc, "This module provides access to selection."); -static PyModuleDef BPyGPU_select_module_def = { +static PyModuleDef py_select_module_def = { PyModuleDef_HEAD_INIT, .m_name = "gpu.select", .m_doc = py_select_doc, .m_methods = py_select_methods, }; -PyObject *BPyInit_gpu_select(void) +PyObject *bpygpu_select_init(void) { PyObject *submodule; - submodule = PyModule_Create(&BPyGPU_select_module_def); + submodule = PyModule_Create(&py_select_module_def); return submodule; } diff --git a/source/blender/python/gpu/gpu_py_select.h b/source/blender/python/gpu/gpu_py_select.h index 857cd7bb7f8..12152c82909 100644 --- a/source/blender/python/gpu/gpu_py_select.h +++ b/source/blender/python/gpu/gpu_py_select.h @@ -20,4 +20,4 @@ #pragma once -PyObject *BPyInit_gpu_select(void); +PyObject *bpygpu_select_init(void); diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c index b2603c75c3f..e5ffbd5e9e3 100644 --- a/source/blender/python/gpu/gpu_py_shader.c +++ b/source/blender/python/gpu/gpu_py_shader.c @@ -736,7 +736,7 @@ PyDoc_STRVAR(py_shader_module_doc, "3D_SMOOTH_COLOR\n" " :Attributes: vec3 pos, vec4 color\n" " :Uniforms: none\n"); -static PyModuleDef BPyGPU_shader_module_def = { +static PyModuleDef py_shader_module_def = { PyModuleDef_HEAD_INIT, .m_name = "gpu.shader", .m_doc = py_shader_module_doc, @@ -760,11 +760,11 @@ PyObject *BPyGPUShader_CreatePyObject(GPUShader *shader, bool is_builtin) return (PyObject *)self; } -PyObject *BPyInit_gpu_shader(void) +PyObject *bpygpu_shader_init(void) { PyObject *submodule; - submodule = PyModule_Create(&BPyGPU_shader_module_def); + submodule = PyModule_Create(&py_shader_module_def); return submodule; } diff --git a/source/blender/python/gpu/gpu_py_shader.h b/source/blender/python/gpu/gpu_py_shader.h index ee26c26acd4..745b9351649 100644 --- a/source/blender/python/gpu/gpu_py_shader.h +++ b/source/blender/python/gpu/gpu_py_shader.h @@ -30,4 +30,4 @@ typedef struct BPyGPUShader { } BPyGPUShader; PyObject *BPyGPUShader_CreatePyObject(struct GPUShader *shader, bool is_builtin); -PyObject *BPyInit_gpu_shader(void); +PyObject *bpygpu_shader_init(void); diff --git a/source/blender/python/gpu/gpu_py_types.c b/source/blender/python/gpu/gpu_py_types.c index 165af47b4b8..d70c5ba4966 100644 --- a/source/blender/python/gpu/gpu_py_types.c +++ b/source/blender/python/gpu/gpu_py_types.c @@ -32,16 +32,16 @@ /** \name GPU Types Module * \{ */ -static struct PyModuleDef BPyGPU_types_module_def = { +static struct PyModuleDef py_types_module_def = { PyModuleDef_HEAD_INIT, .m_name = "gpu.types", }; -PyObject *BPyInit_gpu_types(void) +PyObject *bpygpu_types_init(void) { PyObject *submodule; - submodule = PyModule_Create(&BPyGPU_types_module_def); + submodule = PyModule_Create(&py_types_module_def); if (PyType_Ready(&BPyGPUVertFormat_Type) < 0) { return NULL; diff --git a/source/blender/python/gpu/gpu_py_types.h b/source/blender/python/gpu/gpu_py_types.h index 56f73b8a504..cf8d6d694e6 100644 --- a/source/blender/python/gpu/gpu_py_types.h +++ b/source/blender/python/gpu/gpu_py_types.h @@ -27,4 +27,4 @@ #include "gpu_py_vertex_buffer.h" #include "gpu_py_vertex_format.h" -PyObject *BPyInit_gpu_types(void); +PyObject *bpygpu_types_init(void); -- cgit v1.2.3