mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
put returns on their own lines
This commit is contained in:
parent
050a05aeef
commit
90b13583bc
1 changed files with 10 additions and 5 deletions
|
@ -213,7 +213,8 @@ BaseException_set_args(PyBaseExceptionObject *self, PyObject *val)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
seq = PySequence_Tuple(val);
|
seq = PySequence_Tuple(val);
|
||||||
if (!seq) return -1;
|
if (!seq)
|
||||||
|
return -1;
|
||||||
Py_CLEAR(self->args);
|
Py_CLEAR(self->args);
|
||||||
self->args = seq;
|
self->args = seq;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -252,7 +253,8 @@ BaseException_set_tb(PyBaseExceptionObject *self, PyObject *tb)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
BaseException_get_context(PyObject *self) {
|
BaseException_get_context(PyObject *self) {
|
||||||
PyObject *res = PyException_GetContext(self);
|
PyObject *res = PyException_GetContext(self);
|
||||||
if (res) return res; /* new reference already returned above */
|
if (res)
|
||||||
|
return res; /* new reference already returned above */
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,7 +280,8 @@ BaseException_set_context(PyObject *self, PyObject *arg) {
|
||||||
static PyObject *
|
static PyObject *
|
||||||
BaseException_get_cause(PyObject *self) {
|
BaseException_get_cause(PyObject *self) {
|
||||||
PyObject *res = PyException_GetCause(self);
|
PyObject *res = PyException_GetCause(self);
|
||||||
if (res) return res; /* new reference already returned above */
|
if (res)
|
||||||
|
return res; /* new reference already returned above */
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,7 +675,8 @@ EnvironmentError_reduce(PyEnvironmentErrorObject *self)
|
||||||
* file name given to EnvironmentError. */
|
* file name given to EnvironmentError. */
|
||||||
if (PyTuple_GET_SIZE(args) == 2 && self->filename) {
|
if (PyTuple_GET_SIZE(args) == 2 && self->filename) {
|
||||||
args = PyTuple_New(3);
|
args = PyTuple_New(3);
|
||||||
if (!args) return NULL;
|
if (!args)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
tmp = PyTuple_GET_ITEM(self->args, 0);
|
tmp = PyTuple_GET_ITEM(self->args, 0);
|
||||||
Py_INCREF(tmp);
|
Py_INCREF(tmp);
|
||||||
|
@ -894,7 +898,8 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
|
||||||
if (lenargs == 2) {
|
if (lenargs == 2) {
|
||||||
info = PyTuple_GET_ITEM(args, 1);
|
info = PyTuple_GET_ITEM(args, 1);
|
||||||
info = PySequence_Tuple(info);
|
info = PySequence_Tuple(info);
|
||||||
if (!info) return -1;
|
if (!info)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (PyTuple_GET_SIZE(info) != 4) {
|
if (PyTuple_GET_SIZE(info) != 4) {
|
||||||
/* not a very good error message, but it's what Python 2.4 gives */
|
/* not a very good error message, but it's what Python 2.4 gives */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue