SF 548651: Fix the METH_CLASS implementation.

Most of these patches are from Thomas Heller, with long lines folded
by Tim.  The change to test_descr.py is from Guido.  See the bug report.

Not a bugfix candidate -- METH_CLASS is new in 2.3.
This commit is contained in:
Tim Peters 2002-12-09 22:56:13 +00:00
parent c7e3c5e306
commit bca1cbc6f8
5 changed files with 80 additions and 8 deletions

View file

@ -963,17 +963,16 @@ dict_items(register dictobject *mp)
}
static PyObject *
dict_fromkeys(PyObject *mp, PyObject *args)
dict_fromkeys(PyObject *cls, PyObject *args)
{
PyObject *seq;
PyObject *value = Py_None;
PyObject *it; /* iter(seq) */
PyObject *key;
PyObject *d;
PyObject *cls;
int status;
if (!PyArg_ParseTuple(args, "OO|O:fromkeys", &cls, &seq, &value))
if (!PyArg_ParseTuple(args, "O|O:fromkeys", &seq, &value))
return NULL;
d = PyObject_CallObject(cls, NULL);