diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-04-27 18:40:21 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-04-27 18:40:21 +0000 |
commit | f19a7b90bd0cbdf40d02f125db3e39f077f3a89f (patch) | |
tree | c5ec7d4eb8e528e91715cccab39590324ca0327c /Python/ceval.c | |
parent | fe4948bcefe247ca69e3d605eac1d9d4985e4cfd (diff) | |
download | cpython-git-f19a7b90bd0cbdf40d02f125db3e39f077f3a89f.tar.gz |
A little reformating of Py3k warnings
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c08585178c..0cff157662 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3157,16 +3157,16 @@ do_raise(PyObject *type, PyObject *value, PyObject *tb) /* Not something you can raise. You get an exception anyway, just not what you specified :-) */ PyErr_Format(PyExc_TypeError, - "exceptions must be classes or instances, not %s", - type->ob_type->tp_name); + "exceptions must be classes or instances, not %s", + type->ob_type->tp_name); goto raise_error; } assert(PyExceptionClass_Check(type)); if (Py_Py3kWarningFlag && PyClass_Check(type)) { if (PyErr_WarnEx(PyExc_DeprecationWarning, - "exceptions must derive from BaseException " - "in 3.x", 1) == -1) + "exceptions must derive from BaseException " + "in 3.x", 1) < 0) goto raise_error; } @@ -4092,7 +4092,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) PyExc_DeprecationWarning, "catching of string " "exceptions is deprecated", 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } else if (Py_Py3kWarningFlag && @@ -4103,7 +4103,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) ret_val = PyErr_WarnEx( PyExc_DeprecationWarning, CANNOT_CATCH_MSG, 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } } @@ -4115,7 +4115,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) PyExc_DeprecationWarning, "catching of string " "exceptions is deprecated", 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } else if (Py_Py3kWarningFlag && @@ -4126,7 +4126,7 @@ cmp_outcome(int op, register PyObject *v, register PyObject *w) ret_val = PyErr_WarnEx( PyExc_DeprecationWarning, CANNOT_CATCH_MSG, 1); - if (ret_val == -1) + if (ret_val < 0) return NULL; } } |