Issue #27809: _csv: _call_dialect() uses fast call
This commit is contained in:
parent
d1584d3e7e
commit
6412f4993a
|
@ -518,15 +518,13 @@ static PyTypeObject Dialect_Type = {
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_call_dialect(PyObject *dialect_inst, PyObject *kwargs)
|
_call_dialect(PyObject *dialect_inst, PyObject *kwargs)
|
||||||
{
|
{
|
||||||
PyObject *ctor_args;
|
PyObject *type = (PyObject *)&Dialect_Type;
|
||||||
PyObject *dialect;
|
if (dialect_inst) {
|
||||||
|
return _PyObject_FastCallDict(type, &dialect_inst, 1, kwargs);
|
||||||
ctor_args = Py_BuildValue(dialect_inst ? "(O)" : "()", dialect_inst);
|
}
|
||||||
if (ctor_args == NULL)
|
else {
|
||||||
return NULL;
|
return _PyObject_FastCallDict(type, NULL, 0, kwargs);
|
||||||
dialect = PyObject_Call((PyObject *)&Dialect_Type, ctor_args, kwargs);
|
}
|
||||||
Py_DECREF(ctor_args);
|
|
||||||
return dialect;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue