[Python-checkins] python/nondist/sandbox/setobj setobject.c, 1.21, 1.22

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sat Nov 15 21:22:40 EST 2003


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

Modified Files:
	setobject.c 
Log Message:
Don't re-use the save variable name in set_copy().



Index: setobject.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setobj/setobject.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** setobject.c	15 Nov 2003 22:54:03 -0000	1.21
--- setobject.c	16 Nov 2003 02:22:38 -0000	1.22
***************
*** 128,131 ****
--- 128,132 ----
  {
  	PyObject *data;
+ 	setobject *newso;
  
  	data = PyDict_Copy(so->data);
***************
*** 133,143 ****
  		return NULL;
  
! 	so = (setobject *)PyObject_GC_New(setobject, so->ob_type);
! 	if (so == NULL) {
  		Py_DECREF(data);
  		return NULL;
  	}
! 	so->data = data;
! 	return (PyObject *)so;
  }
  
--- 134,145 ----
  		return NULL;
  
! 	newso = (setobject *)PyObject_GC_New(setobject, so->ob_type);
! 	if (newso == NULL) {
  		Py_DECREF(data);
  		return NULL;
  	}
! 	newso->data = data;
! 	newso->hash = so->hash;
! 	return (PyObject *)newso;
  }
  





More information about the Python-checkins mailing list