diff options
Diffstat (limited to 'source/blender/python/generic/py_capi_utils.c')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 1531b2e0a11..9bbdaa9d6d9 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -646,10 +646,12 @@ PyObject *PyC_ExceptionBuffer(void) goto error_cleanup; } - Py_INCREF(stdout_backup); // since these were borrowed we don't want them freed when replaced. + /* Since these were borrowed we don't want them freed when replaced. */ + Py_INCREF(stdout_backup); Py_INCREF(stderr_backup); - PySys_SetObject("stdout", string_io); // both of these are freed when restoring + /* Both of these are freed when restoring. */ + PySys_SetObject("stdout", string_io); PySys_SetObject("stderr", string_io); PyErr_Restore(error_type, error_value, error_traceback); |