Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Remove workaround from 1c806f6bb4
as this doesn't seem to be needed anymore.
This commit is contained in:
parent
b18c376946
commit
9ce2c5bf50
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue