diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-01-05 07:22:44 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-01-05 07:22:44 (GMT) |
commit | 541ceec3e6e0b5b02c2d299ebf8af040d6193a5e (patch) | |
tree | fc6a3a9d32121f8a43258d125f011b1ec5759043 /Objects/methodobject.c | |
parent | 15ec3731cfd24cb2a7be60db849f3588536eff98 (diff) | |
download | cpython-541ceec3e6e0b5b02c2d299ebf8af040d6193a5e.zip cpython-541ceec3e6e0b5b02c2d299ebf8af040d6193a5e.tar.gz cpython-541ceec3e6e0b5b02c2d299ebf8af040d6193a5e.tar.bz2 |
PyCFunction_Call(): Combined two switch cases w/ identical bodies.
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 7acd220..a1f325d 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -70,6 +70,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: + case METH_OLDARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (kw == NULL || PyDict_Size(kw) == 0) { @@ -104,10 +105,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) return (*meth)(self, arg); } break; - case METH_OLDARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); default: - /* should never get here ??? */ PyErr_BadInternalCall(); return NULL; } @@ -267,7 +265,7 @@ listmethodchain(PyMethodChain *chain) PyMethodDef *ml; int i, n; PyObject *v; - + n = 0; for (c = chain; c != NULL; c = c->link) { for (ml = c->methods; ml->ml_name != NULL; ml++) |