Issue #23781: Add private helper function _PyErr_ReplaceException() that
corresponds _PyErr_ChainExceptions() in Python 3 to help porting patches
from Python 3.
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index dbe3bfa..2ef205e 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -91,6 +91,7 @@
 PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
 PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
 PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
+PyAPI_FUNC(void) _PyErr_ReplaceException(PyObject *, PyObject *, PyObject *);
 
 /* */