Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-07-27 06:02:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-07-27 14:00:49 +0300
commit9ce2c5bf507923ac3add5c8452709310ed5b3b75 (patch)
treedda6c106fe3016b976ead1f6806dbd2d15305aab /source/blender/python
parentb18c376946bc205c5cb35214478862fd0548bf9f (diff)
Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Remove workaround from 1c806f6bb454dca6f682ecd741bd2fe03b9617bb as this doesn't seem to be needed anymore.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_capi_utils.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/python/intern/bpy_capi_utils.c b/source/blender/python/intern/bpy_capi_utils.c
index 89ef2f40a30..0befd6aad2f 100644
--- a/source/blender/python/intern/bpy_capi_utils.c
+++ b/source/blender/python/intern/bpy_capi_utils.c
@@ -128,33 +128,21 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo
const char *filename;
int lineno;
- PyObject *pystring_format; /* workaround, see below */
- const char *cstring;
-
PyC_FileAndNum(&filename, &lineno);
if (filename == NULL) {
filename = "<unknown location>";
}
-#if 0 /* ARG!. workaround for a bug in blenders use of vsnprintf */
BKE_reportf(reports,
RPT_ERROR,
- "%s\nlocation: %s:%d\n",
+ TIP_("%s\nlocation: %s:%d\n"),
_PyUnicode_AsString(pystring),
filename,
lineno);
-#else
- pystring_format = PyUnicode_FromFormat(
- TIP_("%s\nlocation: %s:%d\n"), _PyUnicode_AsString(pystring), filename, lineno);
-
- cstring = _PyUnicode_AsString(pystring_format);
- BKE_report(reports, RPT_ERROR, cstring);
-
- /* not exactly needed. just for testing */
- fprintf(stderr, TIP_("%s\nlocation: %s:%d\n"), cstring, filename, lineno);
- Py_DECREF(pystring_format); /* workaround */
-#endif
+ /* Not exactly needed. Useful for developers tracking down issues. */
+ fprintf(
+ stderr, TIP_("%s\nlocation: %s:%d\n"), _PyUnicode_AsString(pystring), filename, lineno);
}
else {
BKE_report(reports, RPT_ERROR, _PyUnicode_AsString(pystring));