diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-22 09:34:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-22 09:34:10 +0400 |
commit | a79e10157dc7a1c8a102bf88f236d325ecdd8d80 (patch) | |
tree | 2026c37ec8c7da9094bbb20d3aedcdd82d565765 /source/blender/python | |
parent | dd0e2da7847d31cbaf02c665e2c55b5e8c384ed4 (diff) |
code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_meshdata.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_translations.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index f59676252d4..64435792ae2 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -97,7 +97,7 @@ static PyGetSetDef bpy_bmtexpoly_getseters[] = { {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -PyTypeObject BPy_BMTexPoly_Type = {{{0}}}; /* bm.loops.layers.uv.active */ +static PyTypeObject BPy_BMTexPoly_Type = {{{0}}}; /* bm.loops.layers.uv.active */ static void bm_init_types_bmtexpoly(void) { diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index a1751d9717c..6f042318de2 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -441,7 +441,7 @@ PyDoc_STRVAR(app_translations_contexts_C_to_py_doc, "A readonly dict mapping contexts' C-identifiers to their py-identifiers." ); -PyMemberDef app_translations_members[] = { +static PyMemberDef app_translations_members[] = { {(char *)"contexts", T_OBJECT_EX, offsetof(BlenderAppTranslations, contexts), READONLY, app_translations_contexts_doc}, {(char *)"contexts_C_to_py", T_OBJECT_EX, offsetof(BlenderAppTranslations, contexts_C_to_py), READONLY, @@ -486,7 +486,7 @@ static PyObject *app_translations_locales_get(PyObject *UNUSED(self), void *UNUS return ret; } -PyGetSetDef app_translations_getseters[] = { +static PyGetSetDef app_translations_getseters[] = { /* {name, getter, setter, doc, userdata} */ {(char *)"locale", (getter)app_translations_locale_get, NULL, app_translations_locale_doc, NULL}, {(char *)"locales", (getter)app_translations_locales_get, NULL, app_translations_locales_doc, NULL}, @@ -637,7 +637,7 @@ static PyObject *app_translations_locale_explode(BlenderAppTranslations *UNUSED( return Py_BuildValue("sssss", language, country, variant, language_country, language_variant); } -PyMethodDef app_translations_methods[] = { +static PyMethodDef app_translations_methods[] = { /* Can't use METH_KEYWORDS alone, see http://bugs.python.org/issue11587 */ {"register", (PyCFunction)app_translations_py_messages_register, METH_VARARGS | METH_KEYWORDS, app_translations_py_messages_register_doc}, |