summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-27 06:57:14 (GMT)
committerGitHub <noreply@github.com>2019-05-27 06:57:14 (GMT)
commit71c52e3048dd07567f0c690eab4e5d57be66f534 (patch)
tree7f3a063d2d3edb324d7d00bf13a66ddad689d22e /Include
parent2f0bfd27a5e3a9a7cbeb2ddd45ce50c3d4bdb4e9 (diff)
downloadcpython-71c52e3048dd07567f0c690eab4e5d57be66f534.zip
cpython-71c52e3048dd07567f0c690eab4e5d57be66f534.tar.gz
cpython-71c52e3048dd07567f0c690eab4e5d57be66f534.tar.bz2
bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488)
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs. * Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call() and gc delete_garbage().
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/pyerrors.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h
index de6548d..6b0cced 100644
--- a/Include/cpython/pyerrors.h
+++ b/Include/cpython/pyerrors.h
@@ -171,6 +171,9 @@ PyAPI_FUNC(PyObject *) _PyUnicodeTranslateError_Create(
const char *reason /* UTF-8 encoded string */
);
+PyAPI_FUNC(void) _PyErr_WriteUnraisableMsg(
+ const char *err_msg,
+ PyObject *obj);
#ifdef __cplusplus
}