Skip to content

Commit b82fb1b

Browse files
author
tim_one
committed
PyCFunction_Call(): Combined two switch cases w/ identical bodies.
git-svn-id: http://svn.python.org/projects/python/trunk@30602 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 7ced859 commit b82fb1b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Objects/methodobject.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
7070
return (*meth)(self, arg);
7171
break;
7272
case METH_VARARGS | METH_KEYWORDS:
73+
case METH_OLDARGS | METH_KEYWORDS:
7374
return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
7475
case METH_NOARGS:
7576
if (kw == NULL || PyDict_Size(kw) == 0) {
@@ -104,10 +105,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
104105
return (*meth)(self, arg);
105106
}
106107
break;
107-
case METH_OLDARGS | METH_KEYWORDS:
108-
return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
109108
default:
110-
/* should never get here ??? */
111109
PyErr_BadInternalCall();
112110
return NULL;
113111
}
@@ -267,7 +265,7 @@ listmethodchain(PyMethodChain *chain)
267265
PyMethodDef *ml;
268266
int i, n;
269267
PyObject *v;
270-
268+
271269
n = 0;
272270
for (c = chain; c != NULL; c = c->link) {
273271
for (ml = c->methods; ml->ml_name != NULL; ml++)

0 commit comments

Comments
 (0)