mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
This commit is contained in:
parent
bd25030019
commit
f95a1b3c53
248 changed files with 113361 additions and 113361 deletions
|
@ -270,7 +270,7 @@ BaseException_set_context(PyObject *self, PyObject *arg) {
|
|||
} else {
|
||||
/* PyException_SetContext steals this reference */
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
PyException_SetContext(self, arg);
|
||||
return 0;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ BaseException_set_cause(PyObject *self, PyObject *arg) {
|
|||
} else {
|
||||
/* PyException_SetCause steals this reference */
|
||||
Py_INCREF(arg);
|
||||
}
|
||||
}
|
||||
PyException_SetCause(self, arg);
|
||||
return 0;
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ static PyTypeObject _PyExc_BaseException = {
|
|||
PyObject_GenericSetAttr, /*tp_setattro*/
|
||||
0, /*tp_as_buffer*/
|
||||
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_BASE_EXC_SUBCLASS, /*tp_flags*/
|
||||
Py_TPFLAGS_BASE_EXC_SUBCLASS, /*tp_flags*/
|
||||
PyDoc_STR("Common base class for all exceptions"), /* tp_doc */
|
||||
(traverseproc)BaseException_traverse, /* tp_traverse */
|
||||
(inquiry)BaseException_clear, /* tp_clear */
|
||||
|
@ -1013,7 +1013,7 @@ SyntaxError_str(PySyntaxErrorObject *self)
|
|||
result = PyUnicode_FromFormat("%S (%U, line %ld)",
|
||||
self->msg ? self->msg : Py_None,
|
||||
filename,
|
||||
PyLong_AsLongAndOverflow(self->lineno, &overflow));
|
||||
PyLong_AsLongAndOverflow(self->lineno, &overflow));
|
||||
else if (filename)
|
||||
result = PyUnicode_FromFormat("%S (%U)",
|
||||
self->msg ? self->msg : Py_None,
|
||||
|
@ -2011,25 +2011,25 @@ _PyExc_Init(void)
|
|||
|
||||
PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RuntimeError, NULL, NULL);
|
||||
if (!PyExc_RecursionErrorInst)
|
||||
Py_FatalError("Cannot pre-allocate RuntimeError instance for "
|
||||
"recursion errors");
|
||||
Py_FatalError("Cannot pre-allocate RuntimeError instance for "
|
||||
"recursion errors");
|
||||
else {
|
||||
PyBaseExceptionObject *err_inst =
|
||||
(PyBaseExceptionObject *)PyExc_RecursionErrorInst;
|
||||
PyObject *args_tuple;
|
||||
PyObject *exc_message;
|
||||
exc_message = PyUnicode_FromString("maximum recursion depth exceeded");
|
||||
if (!exc_message)
|
||||
Py_FatalError("cannot allocate argument for RuntimeError "
|
||||
"pre-allocation");
|
||||
args_tuple = PyTuple_Pack(1, exc_message);
|
||||
if (!args_tuple)
|
||||
Py_FatalError("cannot allocate tuple for RuntimeError "
|
||||
"pre-allocation");
|
||||
Py_DECREF(exc_message);
|
||||
if (BaseException_init(err_inst, args_tuple, NULL))
|
||||
Py_FatalError("init of pre-allocated RuntimeError failed");
|
||||
Py_DECREF(args_tuple);
|
||||
PyBaseExceptionObject *err_inst =
|
||||
(PyBaseExceptionObject *)PyExc_RecursionErrorInst;
|
||||
PyObject *args_tuple;
|
||||
PyObject *exc_message;
|
||||
exc_message = PyUnicode_FromString("maximum recursion depth exceeded");
|
||||
if (!exc_message)
|
||||
Py_FatalError("cannot allocate argument for RuntimeError "
|
||||
"pre-allocation");
|
||||
args_tuple = PyTuple_Pack(1, exc_message);
|
||||
if (!args_tuple)
|
||||
Py_FatalError("cannot allocate tuple for RuntimeError "
|
||||
"pre-allocation");
|
||||
Py_DECREF(exc_message);
|
||||
if (BaseException_init(err_inst, args_tuple, NULL))
|
||||
Py_FatalError("init of pre-allocated RuntimeError failed");
|
||||
Py_DECREF(args_tuple);
|
||||
}
|
||||
|
||||
Py_DECREF(bltinmod);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue