summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-01 13:59:50 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-01 13:59:50 (GMT)
commitf2fc934a77fef3ef368f4a41e05e67b846821a12 (patch)
treeffe2a7e765f9b462071f416ab4cc0a92c0363f6b /Objects
parent55ac8f0f26efdbbcb5cc197f9369d23d50bee908 (diff)
downloadcpython-f2fc934a77fef3ef368f4a41e05e67b846821a12.zip
cpython-f2fc934a77fef3ef368f4a41e05e67b846821a12.tar.gz
cpython-f2fc934a77fef3ef368f4a41e05e67b846821a12.tar.bz2
Get rid of METH_OLDARGS.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/methodobject.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index d7dc280..8a8ca03 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -73,7 +73,6 @@ 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) {
@@ -97,19 +96,11 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
return NULL;
}
break;
- case METH_OLDARGS:
- /* the really old style */
- if (kw == NULL || PyDict_Size(kw) == 0) {
- size = PyTuple_GET_SIZE(arg);
- if (size == 1)
- arg = PyTuple_GET_ITEM(arg, 0);
- else if (size == 0)
- arg = NULL;
- return (*meth)(self, arg);
- }
- break;
default:
- PyErr_BadInternalCall();
+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+ "PyCFunction_Call. METH_OLDARGS is no "
+ "longer supported!");
+
return NULL;
}
PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",