put returns on their own lines

This commit is contained in:
Benjamin Peterson 2012-02-03 19:22:31 -05:00
parent 0013783d2f
commit 4c79aec716
1 changed files with 12 additions and 6 deletions

View File

@ -306,7 +306,8 @@ BaseException_set_args(PyBaseExceptionObject *self, PyObject *val)
return -1;
}
seq = PySequence_Tuple(val);
if (!seq) return -1;
if (!seq)
return -1;
Py_CLEAR(self->args);
self->args = seq;
return 0;
@ -773,7 +774,8 @@ EnvironmentError_reduce(PyEnvironmentErrorObject *self)
* file name given to EnvironmentError. */
if (PyTuple_GET_SIZE(args) == 2 && self->filename) {
args = PyTuple_New(3);
if (!args) return NULL;
if (!args)
return NULL;
tmp = PyTuple_GET_ITEM(self->args, 0);
Py_INCREF(tmp);
@ -1071,7 +1073,8 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
if (lenargs == 2) {
info = PyTuple_GET_ITEM(args, 1);
info = PySequence_Tuple(info);
if (!info) return -1;
if (!info)
return -1;
if (PyTuple_GET_SIZE(info) != 4) {
/* not a very good error message, but it's what Python 2.4 gives */
@ -1167,9 +1170,11 @@ SyntaxError_str(PySyntaxErrorObject *self)
str = PyObject_Str(self->msg);
else
str = PyObject_Str(Py_None);
if (!str) return NULL;
if (!str)
return NULL;
/* Don't fiddle with non-string return (shouldn't happen anyway) */
if (!PyString_Check(str)) return str;
if (!PyString_Check(str))
return str;
/* XXX -- do all the additional formatting with filename and
lineno here */
@ -2111,7 +2116,8 @@ _PyExc_Init(void)
m = Py_InitModule4("exceptions", functions, exceptions_doc,
(PyObject *)NULL, PYTHON_API_VERSION);
if (m == NULL) return;
if (m == NULL)
return;
bltinmod = PyImport_ImportModule("__builtin__");
if (bltinmod == NULL)