[Python-checkins] CVS: python/dist/src/Objects sliceobject.c,2.5,2.6

Guido van Rossum python-dev@python.org
Thu, 14 Dec 2000 07:09:52 -0800


Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv12503

Modified Files:
	sliceobject.c 
Log Message:
Test for NULL returned from PyObject_NEW().


Index: sliceobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/sliceobject.c,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** sliceobject.c	2000/07/09 06:21:27	2.5
--- sliceobject.c	2000/12/14 15:09:46	2.6
***************
*** 56,59 ****
--- 56,62 ----
  	PySliceObject *obj = PyObject_NEW(PySliceObject, &PySlice_Type);
  
+ 	if (obj == NULL)
+ 		return NULL;
+ 
  	if (step == NULL) step = Py_None;
  	Py_INCREF(step);