diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 06:30:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-21 06:30:40 +0400 |
commit | 38cee985bb6d6a45fe59cc539dfa9cd6412b6f36 (patch) | |
tree | 59497913e5644e045b21ecb7ba7ad0ee3a5a8ac8 /source/blender/python | |
parent | add25e43adae7204d27685eafefde343096d5698 (diff) |
code cleanup: style & warnings.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_app_translations.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index b501ed2a226..6e9f12ec529 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -147,7 +147,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) _translations_cache = BLI_ghash_new(_ghashutil_keyhash, _ghashutil_keycmp, __func__); /* Iterate over all py dicts. */ - while(PyDict_Next(py_messages, &pos, NULL, &uuid_dict)) { + while (PyDict_Next(py_messages, &pos, NULL, &uuid_dict)) { PyObject *lang_dict; #if 0 @@ -172,7 +172,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale) Py_ssize_t ppos = 0; /* Iterate over all translations of the found language dict, and populate our ghash cache. */ - while(PyDict_Next(lang_dict, &ppos, &pykey, &trans)) { + while (PyDict_Next(lang_dict, &ppos, &pykey, &trans)) { GHashKey *key; PyObject *tmp; const char *msgctxt = NULL, *msgid = NULL; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 611095bfe20..85a6db00703 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1626,8 +1626,6 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb /* Unicode String */ #ifdef WITH_INTERNATIONAL bool do_translate = RNA_property_flag(prop) & PROP_STRING_PY_TRANSLATE; -#else - bool do_translate = false; #endif /* WITH_INTERNATIONAL */ #ifdef USE_STRING_COERCE @@ -1644,9 +1642,11 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb #endif /* USE_STRING_COERCE */ /* Any half-brained compiler should be able to optimize this out when WITH_INTERNATIONAL is off */ +#ifdef WITH_INTERNATIONAL if (do_translate) { param = IFACE_(param); } +#endif if (param == NULL) { if (PyUnicode_Check(value)) { |