Skip to content

Commit 2362b37

Browse files
author
tim_one
committed
Removed two pointless and obfuscating macros.
git-svn-id: http://svn.python.org/projects/python/trunk@23889 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 56a90e0 commit 2362b37

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

Python/traceback.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ tb_dealloc(tracebackobject *tb)
4242
Py_TRASHCAN_SAFE_END(tb)
4343
}
4444

45-
#define Tracebacktype PyTraceBack_Type
46-
#define is_tracebackobject PyTraceBack_Check
47-
48-
PyTypeObject Tracebacktype = {
45+
PyTypeObject PyTraceBack_Type = {
4946
PyObject_HEAD_INIT(&PyType_Type)
5047
0,
5148
"traceback",
@@ -67,12 +64,12 @@ newtracebackobject(tracebackobject *next, PyFrameObject *frame, int lasti,
6764
int lineno)
6865
{
6966
tracebackobject *tb;
70-
if ((next != NULL && !is_tracebackobject(next)) ||
67+
if ((next != NULL && !PyTraceBack_Check(next)) ||
7168
frame == NULL || !PyFrame_Check(frame)) {
7269
PyErr_BadInternalCall();
7370
return NULL;
7471
}
75-
tb = PyObject_NEW(tracebackobject, &Tracebacktype);
72+
tb = PyObject_NEW(tracebackobject, &PyTraceBack_Type);
7673
if (tb != NULL) {
7774
Py_XINCREF(next);
7875
tb->tb_next = next;
@@ -223,7 +220,7 @@ PyTraceBack_Print(PyObject *v, PyObject *f)
223220
int limit = 1000;
224221
if (v == NULL)
225222
return 0;
226-
if (!is_tracebackobject(v)) {
223+
if (!PyTraceBack_Check(v)) {
227224
PyErr_BadInternalCall();
228225
return -1;
229226
}

0 commit comments

Comments
 (0)