Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1584d3 commit 6412f49Copy full SHA for 6412f49
1 file changed
Modules/_csv.c
@@ -518,15 +518,13 @@ static PyTypeObject Dialect_Type = {
518
static PyObject *
519
_call_dialect(PyObject *dialect_inst, PyObject *kwargs)
520
{
521
- PyObject *ctor_args;
522
- PyObject *dialect;
523
-
524
- ctor_args = Py_BuildValue(dialect_inst ? "(O)" : "()", dialect_inst);
525
- if (ctor_args == NULL)
526
- return NULL;
527
- dialect = PyObject_Call((PyObject *)&Dialect_Type, ctor_args, kwargs);
528
- Py_DECREF(ctor_args);
529
- return dialect;
+ PyObject *type = (PyObject *)&Dialect_Type;
+ if (dialect_inst) {
+ return _PyObject_FastCallDict(type, &dialect_inst, 1, kwargs);
+ }
+ else {
+ return _PyObject_FastCallDict(type, NULL, 0, kwargs);
530
}
531
532
/*
0 commit comments