[Python-checkins] commit of r41614 - python/branches/ast-arena/Python/ast.c

neal.norwitz python-checkins at python.org
Mon Dec 5 08:56:07 CET 2005


Author: neal.norwitz
Date: Mon Dec  5 08:55:59 2005
New Revision: 41614

Modified:
   python/branches/ast-arena/Python/ast.c
Log:
Need to add these objects to the arena so they don't leak

Modified: python/branches/ast-arena/Python/ast.c
==============================================================================
--- python/branches/ast-arena/Python/ast.c	(original)
+++ python/branches/ast-arena/Python/ast.c	Mon Dec  5 08:55:59 2005
@@ -1167,6 +1167,7 @@
 	if (!str)
 	    return NULL;
 	
+	PyArena_AddPyObject(c->c_arena, str);
 	return Str(str, LINENO(n), c->c_arena);
     }
     case NUMBER: {
@@ -1175,6 +1176,7 @@
 	if (!pynum)
 	    return NULL;
 	
+	PyArena_AddPyObject(c->c_arena, pynum);
 	return Num(pynum, LINENO(n), c->c_arena);
     }
     case LPAR: /* some parenthesized expressions */


More information about the Python-checkins mailing list