[Python-checkins] python/dist/src/Modules _csv.c,1.13,1.14
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sun Jun 20 00:23:22 EDT 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30600
Modified Files:
_csv.c
Log Message:
Use PyArg_UnpackTuple() where possible.
Index: _csv.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_csv.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** _csv.c 2 Dec 2003 18:57:47 -0000 1.13
--- _csv.c 20 Jun 2004 04:23:19 -0000 1.14
***************
*** 301,305 ****
self->strict = 0;
! if (!PyArg_ParseTuple(args, "|O", &dialect))
return -1;
Py_XINCREF(dialect);
--- 301,305 ----
self->strict = 0;
! if (!PyArg_UnpackTuple(args, "", 0, 1, &dialect))
return -1;
Py_XINCREF(dialect);
***************
*** 843,847 ****
self->state = START_RECORD;
! if (!PyArg_ParseTuple(args, "O|O", &iterator, &dialect)) {
Py_DECREF(self);
return NULL;
--- 843,847 ----
self->state = START_RECORD;
! if (!PyArg_UnpackTuple(args, "", 1, 2, &iterator, &dialect)) {
Py_DECREF(self);
return NULL;
***************
*** 1288,1292 ****
self->num_fields = 0;
! if (!PyArg_ParseTuple(args, "O|O", &output_file, &dialect)) {
Py_DECREF(self);
return NULL;
--- 1288,1292 ----
self->num_fields = 0;
! if (!PyArg_UnpackTuple(args, "", 1, 2, &output_file, &dialect)) {
Py_DECREF(self);
return NULL;
***************
*** 1328,1332 ****
PyObject *name_obj, *dialect_obj;
! if (!PyArg_ParseTuple(args, "OO", &name_obj, &dialect_obj))
return NULL;
if (!PyString_Check(name_obj)
--- 1328,1332 ----
PyObject *name_obj, *dialect_obj;
! if (!PyArg_UnpackTuple(args, "", 2, 2, &name_obj, &dialect_obj))
return NULL;
if (!PyString_Check(name_obj)
More information about the Python-checkins
mailing list