From 9ce2c5bf507923ac3add5c8452709310ed5b3b75 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Jul 2020 13:02:33 +1000 Subject: Cleanup: remove workaround for old BLI_dynstr_vappendf bug Remove workaround from 1c806f6bb454dca6f682ecd741bd2fe03b9617bb as this doesn't seem to be needed anymore. --- source/blender/python/intern/bpy_capi_utils.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'source/blender/python') 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 = ""; } -#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)); -- cgit v1.2.3