Cleanup: happily remove no-more-used PY_TRANSLATE RNA prop flag, and related code (just realized that flag value was wrong, probably own typo in a previous commit :/ ).

That "trick" was nice when introduced, but it became kind of a pita since we added translation contexts...
This commit is contained in:
2013-02-08 15:16:57 +00:00
parent e6cd9ea087
commit 95b28a65f3
5 changed files with 3 additions and 35 deletions

View File

@@ -1624,10 +1624,6 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
}
else {
/* Unicode String */
#ifdef WITH_INTERNATIONAL
bool do_translate = RNA_property_flag(prop) & PROP_STRING_PY_TRANSLATE;
#endif /* WITH_INTERNATIONAL */
#ifdef USE_STRING_COERCE
PyObject *value_coerce = NULL;
if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) {
@@ -1641,13 +1637,6 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
param = _PyUnicode_AsString(value);
#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)) {
/* there was an error assigning a string type,