mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
* set_new() doesn't need to zero the structure a second time after tp_alloc
has already done the job. * Use a macro form of PyErr_Occurred() inside the set_lookkey() function.
This commit is contained in:
parent
fe889f3c62
commit
5ba0cbe392
2 changed files with 12 additions and 3 deletions
|
@ -15,6 +15,12 @@ PyAPI_FUNC(void) PyErr_Clear(void);
|
|||
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
|
||||
PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
|
||||
|
||||
#ifdef Py_DEBUG
|
||||
#define _PyErr_OCCURRED() PyErr_Occurred()
|
||||
#else
|
||||
#define _PyErr_OCCURRED() (_PyThreadState_Current->curexc_type)
|
||||
#endif
|
||||
|
||||
/* Error testing and normalization */
|
||||
PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
|
||||
PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue