* 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:
Raymond Hettinger 2005-08-06 18:31:24 +00:00
parent fe889f3c62
commit 5ba0cbe392
2 changed files with 12 additions and 3 deletions

View file

@ -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 *);