[Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.81.6.5,2.81.6.6

Guido van Rossum gvanrossum@users.sourceforge.net
Tue, 10 Jul 2001 09:33:55 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv13204

Modified Files:
      Tag: descr-branch
	floatobject.c 
Log Message:
float_new(): prevent core dump on 'float()' call without argument, by
initializing x to zero (Py_False being a good stand-in).


Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.81.6.5
retrieving revision 2.81.6.6
diff -C2 -r2.81.6.5 -r2.81.6.6
*** floatobject.c	2001/07/07 22:55:30	2.81.6.5
--- floatobject.c	2001/07/10 16:33:53	2.81.6.6
***************
*** 634,638 ****
  float_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
  {
! 	PyObject *x;
  	static char *kwlist[] = {"x", 0};
  
--- 634,638 ----
  float_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
  {
! 	PyObject *x = Py_False; /* Integer zero */
  	static char *kwlist[] = {"x", 0};