]> granicus.if.org Git - python/commitdiff
PyCFunction_Call(): Combined two switch cases w/ identical bodies.
authorTim Peters <tim.peters@gmail.com>
Sun, 5 Jan 2003 07:22:44 +0000 (07:22 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 5 Jan 2003 07:22:44 +0000 (07:22 +0000)
Objects/methodobject.c

index 7acd2202c929ddf5811fa2188eba1720804cd5ea..a1f325de58f48fc2f2b9a7b9d82026bf8b5cea5f 100644 (file)
@@ -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++)