diff Include/pyerrors.h @ 76942:b0eb7d2a9542

PEP 415: Implement suppression of __context__ display with an exception attribute This replaces the original PEP 409 implementation. See #14133.
author Benjamin Peterson <benjamin@python.org>
date Mon, 14 May 2012 22:09:31 -0700
parents 9fdec1354af4
children 696d3631a4a1
line wrap: on
line diff
--- a/Include/pyerrors.h	Mon May 14 22:19:10 2012 -0400
+++ b/Include/pyerrors.h	Mon May 14 22:09:31 2012 -0700
@@ -10,7 +10,8 @@
 /* PyException_HEAD defines the initial segment of every exception class. */
 #define PyException_HEAD PyObject_HEAD PyObject *dict;\
              PyObject *args; PyObject *traceback;\
-             PyObject *context; PyObject *cause;
+             PyObject *context; PyObject *cause;\
+             int suppress_context;
 
 typedef struct {
     PyException_HEAD
@@ -114,7 +115,6 @@
 /* Cause manipulation (PEP 3134) */
 PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *);
 PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *);
-PyAPI_FUNC(int) _PyException_SetCauseChecked(PyObject *, PyObject *);
 
 /* Context manipulation (PEP 3134) */
 PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *);