diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-15 13:11:17 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-15 13:11:17 +0400 |
commit | da9394f596acba3e93c77479a9906580cddf45d1 (patch) | |
tree | d85850273525c38ee78355eeddc1f061ae18a354 /source/blender/python/intern/bpy_util.c | |
parent | abff7cac7e0c682bba013036418cc3ea384d74de (diff) |
code cleanup: define sizes of vectors for function args and use C style comments
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index 6c61d7540ab..30b6806a796 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -81,7 +81,7 @@ short BPy_reports_to_error(ReportList *reports, PyObject *exception, const short short BPy_errors_to_report(ReportList *reports) { PyObject *pystring; - PyObject *pystring_format = NULL; // workaround, see below + PyObject *pystring_format = NULL; /* workaround, see below */ char *cstring; const char *filename; @@ -110,17 +110,18 @@ short BPy_errors_to_report(ReportList *reports) cstring = _PyUnicode_AsString(pystring); -#if 0 // ARG!. workaround for a bug in blenders use of vsnprintf +#if 0 /* ARG!. workaround for a bug in blenders use of vsnprintf */ BKE_reportf(reports, RPT_ERROR, "%s\nlocation:%s:%d\n", cstring, filename, lineno); #else pystring_format = PyUnicode_FromFormat(TIP_("%s\nlocation:%s:%d\n"), cstring, filename, lineno); cstring = _PyUnicode_AsString(pystring_format); BKE_report(reports, RPT_ERROR, cstring); #endif - - fprintf(stderr, TIP_("%s\nlocation:%s:%d\n"), cstring, filename, lineno); // not exactly needed. just for testing - + + /* not exactly needed. just for testing */ + fprintf(stderr, TIP_("%s\nlocation:%s:%d\n"), cstring, filename, lineno); + Py_DECREF(pystring); - Py_DECREF(pystring_format); // workaround + Py_DECREF(pystring_format); /* workaround */ return 1; } |