[Bf-blender-cvs] [9ce2c5bf507] master: Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Campbell Barton
noreply at git.blender.org
Mon Jul 27 13:02:15 CEST 2020
Commit: 9ce2c5bf507923ac3add5c8452709310ed5b3b75
Author: Campbell Barton
Date: Mon Jul 27 13:02:33 2020 +1000
Branches: master
https://developer.blender.org/rB9ce2c5bf507923ac3add5c8452709310ed5b3b75
Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Remove workaround from 1c806f6bb454dca6f682ecd741bd2fe03b9617bb
as this doesn't seem to be needed anymore.
===================================================================
M source/blender/python/intern/bpy_capi_utils.c
===================================================================
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));
More information about the Bf-blender-cvs
mailing list