[Python-checkins] python/dist/src/Modules cStringIO.c,2.45,2.46

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Fri Feb 27 05:31:01 EST 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164

Modified Files:
	cStringIO.c 
Log Message:
Speed-up the joiner call by avoiding Py_BuildValue().

Index: cStringIO.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cStringIO.c,v
retrieving revision 2.45
retrieving revision 2.46
diff -C2 -d -r2.45 -r2.46
*** cStringIO.c	12 Oct 2003 19:09:36 -0000	2.45
--- cStringIO.c	27 Feb 2004 10:30:49 -0000	2.46
***************
*** 437,441 ****
          if (PyObject_Size(args) < 0) return NULL;
  
!         tmp = PyObject_CallFunction(joiner, "O", args);
          UNLESS (tmp) return NULL;
  
--- 437,445 ----
          if (PyObject_Size(args) < 0) return NULL;
  
! 	args = PyTuple_Pack(1, args);
! 	if (args == NULL)
! 		return NULL;
! 	tmp = PyObject_Call(joiner, args, NULL);
! 	Py_DECREF(args);
          UNLESS (tmp) return NULL;
  




More information about the Python-checkins mailing list