[Python-checkins] CVS: python/dist/src/Objects structseq.c,1.3.6.2,1.3.6.3

Michael Hudson mwh@users.sourceforge.net
Thu, 07 Mar 2002 07:16:09 -0800


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

Modified Files:
      Tag: release22-maint
	structseq.c 
Log Message:
backport my checkin of
    revision 1.6 of structseq.c

Guido pointed out that I was missing a couple decrefs.


Index: structseq.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/structseq.c,v
retrieving revision 1.3.6.2
retrieving revision 1.3.6.3
diff -C2 -d -r1.3.6.2 -r1.3.6.3
*** structseq.c	7 Mar 2002 10:16:43 -0000	1.3.6.2
--- structseq.c	7 Mar 2002 15:16:07 -0000	1.3.6.3
***************
*** 234,237 ****
--- 234,238 ----
  	PyObject* tup;
  	PyObject* dict;
+ 	PyObject* result;
  	long n_fields, n_visible_fields;
  	int i;
***************
*** 260,264 ****
  	}
  
! 	return Py_BuildValue("(O(OO))", self->ob_type, tup, dict);
  }
  
--- 261,270 ----
  	}
  
! 	result = Py_BuildValue("(O(OO))", self->ob_type, tup, dict);
! 
! 	Py_DECREF(tup);
! 	Py_DECREF(dict);
! 
! 	return result;
  }