summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-09-28 21:58:57 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-09-28 21:58:57 (GMT)
commit2aa2b3b4d5228a36580937ce1b291e89e710bdff (patch)
treef93976fe758d747737bf5180b519557e0ed9110a /Objects/typeobject.c
parent48a2f8fd972205688a1011348100bdb482c81836 (diff)
downloadcpython-2aa2b3b4d5228a36580937ce1b291e89e710bdff.zip
cpython-2aa2b3b4d5228a36580937ce1b291e89e710bdff.tar.gz
cpython-2aa2b3b4d5228a36580937ce1b291e89e710bdff.tar.bz2
Clean up a few tabs that went in with PEP393.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 4bec4b6..32b2672 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2345,21 +2345,21 @@ PyObject* PyType_FromSpec(PyType_Spec *spec)
return NULL;
res->ht_name = PyUnicode_FromString(spec->name);
if (!res->ht_name)
- goto fail;
+ goto fail;
res->ht_type.tp_name = _PyUnicode_AsString(res->ht_name);
if (!res->ht_type.tp_name)
- goto fail;
+ goto fail;
res->ht_type.tp_basicsize = spec->basicsize;
res->ht_type.tp_itemsize = spec->itemsize;
res->ht_type.tp_flags = spec->flags | Py_TPFLAGS_HEAPTYPE;
for (slot = spec->slots; slot->slot; slot++) {
- if (slot->slot >= sizeof(slotoffsets)/sizeof(slotoffsets[0])) {
- PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
- goto fail;
- }
- *(void**)(res_start + slotoffsets[slot->slot]) = slot->pfunc;
+ if (slot->slot >= sizeof(slotoffsets)/sizeof(slotoffsets[0])) {
+ PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
+ goto fail;
+ }
+ *(void**)(res_start + slotoffsets[slot->slot]) = slot->pfunc;
/* need to make a copy of the docstring slot, which usually
points to a static string literal */
@@ -2367,7 +2367,7 @@ PyObject* PyType_FromSpec(PyType_Spec *spec)
ssize_t len = strlen(slot->pfunc)+1;
char *tp_doc = PyObject_MALLOC(len);
if (tp_doc == NULL)
- goto fail;
+ goto fail;
memcpy(tp_doc, slot->pfunc, len);
res->ht_type.tp_doc = tp_doc;
}