mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Untabify C files. Will watch buildbots.
This commit is contained in:
parent
368ede83d9
commit
c83ea137d7
318 changed files with 198669 additions and 198669 deletions
|
@ -217,7 +217,7 @@ BaseException_setstate(PyObject *self, PyObject *state)
|
|||
static PyMethodDef BaseException_methods[] = {
|
||||
{"__reduce__", (PyCFunction)BaseException_reduce, METH_NOARGS },
|
||||
{"__setstate__", (PyCFunction)BaseException_setstate, METH_O },
|
||||
#ifdef Py_USING_UNICODE
|
||||
#ifdef Py_USING_UNICODE
|
||||
{"__unicode__", (PyCFunction)BaseException_unicode, METH_NOARGS },
|
||||
#endif
|
||||
{NULL, NULL, 0, NULL},
|
||||
|
@ -236,7 +236,7 @@ BaseException_getitem(PyBaseExceptionObject *self, Py_ssize_t index)
|
|||
|
||||
static PyObject *
|
||||
BaseException_getslice(PyBaseExceptionObject *self,
|
||||
Py_ssize_t start, Py_ssize_t stop)
|
||||
Py_ssize_t start, Py_ssize_t stop)
|
||||
{
|
||||
if (PyErr_WarnPy3k("__getslice__ not supported for exception "
|
||||
"classes in 3.x; use args attribute", 1) < 0)
|
||||
|
@ -316,7 +316,7 @@ static PyObject *
|
|||
BaseException_get_message(PyBaseExceptionObject *self)
|
||||
{
|
||||
PyObject *msg;
|
||||
|
||||
|
||||
/* if "message" is in self->dict, accessing a user-set message attribute */
|
||||
if (self->dict &&
|
||||
(msg = PyDict_GetItemString(self->dict, "message"))) {
|
||||
|
@ -352,7 +352,7 @@ BaseException_set_message(PyBaseExceptionObject *self, PyObject *val)
|
|||
self->message = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* else set it in __dict__, but may need to create the dict first */
|
||||
if (self->dict == NULL) {
|
||||
self->dict = PyDict_New();
|
||||
|
@ -366,7 +366,7 @@ static PyGetSetDef BaseException_getset[] = {
|
|||
{"__dict__", (getter)BaseException_get_dict, (setter)BaseException_set_dict},
|
||||
{"args", (getter)BaseException_get_args, (setter)BaseException_set_args},
|
||||
{"message", (getter)BaseException_get_message,
|
||||
(setter)BaseException_set_message},
|
||||
(setter)BaseException_set_message},
|
||||
{NULL},
|
||||
};
|
||||
|
||||
|
@ -393,7 +393,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 */
|
||||
|
@ -2186,25 +2186,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 = PyString_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 = PyString_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