[Python-checkins] python/nondist/sandbox/csv _csv.c,1.10,1.11

davecole@users.sourceforge.net davecole@users.sourceforge.net
Sun, 02 Feb 2003 04:58:42 -0800


Update of /cvsroot/python/python/nondist/sandbox/csv
In directory sc8-pr-cvs1:/tmp/cvs-serv27784

Modified Files:
	_csv.c 
Log Message:
Better use of METH_ flags.


Index: _csv.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/csv/_csv.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** _csv.c	2 Feb 2003 12:16:26 -0000	1.10
--- _csv.c	2 Feb 2003 12:58:40 -0000	1.11
***************
*** 357,365 ****
  
  static PyObject *
! Parser_clear(ParserObj *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ""))
- 		return NULL;
- 
  	clear_fields_and_status(self);
  
--- 357,362 ----
  
  static PyObject *
! Parser_clear(ParserObj *self)
  {
  	clear_fields_and_status(self);
  
***************
*** 560,570 ****
  
  static PyObject *
! Parser_join(ParserObj *self, PyObject *args)
  {
- 	PyObject *seq;
  	int len, i;
  
- 	if (!PyArg_ParseTuple(args, "O", &seq))
- 		return NULL;
  	if (!PySequence_Check(seq))
  		return raise_exception("sequence expected");
--- 557,564 ----
  
  static PyObject *
! Parser_join(ParserObj *self, PyObject *seq)
  {
  	int len, i;
  
  	if (!PySequence_Check(seq))
  		return raise_exception("sequence expected");
***************
*** 619,625 ****
  	{ "parse", (PyCFunction)Parser_parse, METH_VARARGS,
  	  Parser_parse_doc },
! 	{ "clear", (PyCFunction)Parser_clear, METH_VARARGS,
  	  Parser_clear_doc },
! 	{ "join", (PyCFunction)Parser_join, METH_VARARGS,
  	  Parser_join_doc },
  	{ NULL, NULL }
--- 613,619 ----
  	{ "parse", (PyCFunction)Parser_parse, METH_VARARGS,
  	  Parser_parse_doc },
! 	{ "clear", (PyCFunction)Parser_clear, METH_NOARGS,
  	  Parser_clear_doc },
! 	{ "join", (PyCFunction)Parser_join, METH_O,
  	  Parser_join_doc },
  	{ NULL, NULL }