[Python-checkins] cpython (merge 3.2 -> default): merge 3.2
benjamin.peterson
python-checkins at python.org
Wed Oct 19 22:58:20 CEST 2011
http://hg.python.org/cpython/rev/08f8a0fd483f
changeset: 73011:08f8a0fd483f
parent: 73009:5cced40374df
parent: 73010:9c79a25f4a8b
user: Benjamin Peterson <benjamin at python.org>
date: Wed Oct 19 16:58:15 2011 -0400
summary:
merge 3.2
files:
Objects/genobject.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Objects/genobject.c b/Objects/genobject.c
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -232,8 +232,9 @@
/* First, check the traceback argument, replacing None with
NULL. */
- if (tb == Py_None)
+ if (tb == Py_None) {
tb = NULL;
+ }
else if (tb != NULL && !PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"throw() third argument must be a traceback object");
@@ -244,9 +245,8 @@
Py_XINCREF(val);
Py_XINCREF(tb);
- if (PyExceptionClass_Check(typ)) {
+ if (PyExceptionClass_Check(typ))
PyErr_NormalizeException(&typ, &val, &tb);
- }
else if (PyExceptionInstance_Check(typ)) {
/* Raising an instance. The value should be a dummy. */
@@ -262,10 +262,9 @@
typ = PyExceptionInstance_Class(typ);
Py_INCREF(typ);
- if (tb == NULL) {
+ if (tb == NULL)
/* Returns NULL if there's no traceback */
tb = PyException_GetTraceback(val);
- }
}
}
else {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list