[Python-checkins] python/dist/src/Python newcompile.c, 1.1.2.97, 1.1.2.98

jhylton at users.sourceforge.net jhylton at users.sourceforge.net
Fri Apr 23 14:35:16 EDT 2004


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

Modified Files:
      Tag: ast-branch
	newcompile.c 
Log Message:
Be sure to decref the temp name generated for a nested argument tuple.


Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.97
retrieving revision 1.1.2.98
diff -C2 -d -r1.1.2.97 -r1.1.2.98
*** newcompile.c	23 Apr 2004 15:32:26 -0000	1.1.2.97
--- newcompile.c	23 Apr 2004 18:35:13 -0000	1.1.2.98
***************
*** 1253,1262 ****
  
          /* unpack nested arguments */
!         for (i = 0; i < asdl_seq_LEN(args->args); i++) {
              expr_ty arg = asdl_seq_GET(args->args, i);
              if (arg->kind == Tuple_kind) {
                  PyObject *id = PyString_FromFormat(".%d", i);
!                 if (id == NULL || !compiler_nameop(c, id, Load))
!                     return 0;
                  VISIT(c, expr, arg);
              }
--- 1253,1268 ----
  
          /* unpack nested arguments */
! 	n = asdl_seq_LEN(args->args);
!         for (i = 0; i < n; i++) {
              expr_ty arg = asdl_seq_GET(args->args, i);
              if (arg->kind == Tuple_kind) {
                  PyObject *id = PyString_FromFormat(".%d", i);
!                 if (id == NULL)
! 			return 0;
! 		if (!compiler_nameop(c, id, Load)) {
! 			Py_DECREF(id);
! 			return 0;
! 		}
! 		Py_DECREF(id);
                  VISIT(c, expr, arg);
              }




More information about the Python-checkins mailing list