mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050)
* Add tstate parameter to _Py_CheckFunctionResult() * Add _PyErr_FormatFromCauseTstate() * Replace PyErr_XXX(...) with _PyErr_XXX(state, ...)
This commit is contained in:
parent
be434dc038
commit
1726909094
7 changed files with 94 additions and 52 deletions
|
@ -520,6 +520,21 @@ _PyErr_FormatVFromCause(PyThreadState *tstate, PyObject *exception,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
_PyErr_FormatFromCauseTstate(PyThreadState *tstate, PyObject *exception,
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list vargs;
|
||||
#ifdef HAVE_STDARG_PROTOTYPES
|
||||
va_start(vargs, format);
|
||||
#else
|
||||
va_start(vargs);
|
||||
#endif
|
||||
_PyErr_FormatVFromCause(tstate, exception, format, vargs);
|
||||
va_end(vargs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PyObject *
|
||||
_PyErr_FormatFromCause(PyObject *exception, const char *format, ...)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue