Commit 541ceec3 authored by Tim Peters's avatar Tim Peters

PyCFunction_Call(): Combined two switch cases w/ identical bodies.

parent 15ec3731
...@@ -70,6 +70,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) ...@@ -70,6 +70,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
return (*meth)(self, arg); return (*meth)(self, arg);
break; break;
case METH_VARARGS | METH_KEYWORDS: case METH_VARARGS | METH_KEYWORDS:
case METH_OLDARGS | METH_KEYWORDS:
return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
case METH_NOARGS: case METH_NOARGS:
if (kw == NULL || PyDict_Size(kw) == 0) { if (kw == NULL || PyDict_Size(kw) == 0) {
...@@ -104,10 +105,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) ...@@ -104,10 +105,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
return (*meth)(self, arg); return (*meth)(self, arg);
} }
break; break;
case METH_OLDARGS | METH_KEYWORDS:
return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
default: default:
/* should never get here ??? */
PyErr_BadInternalCall(); PyErr_BadInternalCall();
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment