[Python-checkins] commit of r41760 - python/trunk/Python/compile.c python/trunk/Python/pyarena.c

fredrik.lundh python-checkins at python.org
Sun Dec 18 16:44:24 CET 2005


Author: fredrik.lundh
Date: Sun Dec 18 16:44:21 2005
New Revision: 41760

Modified:
   python/trunk/Python/compile.c
   python/trunk/Python/pyarena.c
Log:
fixed compilation with an ordinary C89 compiler



Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c	(original)
+++ python/trunk/Python/compile.c	Sun Dec 18 16:44:21 2005
@@ -296,8 +296,7 @@
 PyNode_Compile(struct _node *n, const char *filename)
 {
 	PyCodeObject *co = NULL;
-        PyArena *arena;
-        arena = PyArena_New();
+        PyArena *arena = PyArena_New();
 	mod_ty mod = PyAST_FromNode(n, NULL, filename, arena);
 	if (mod)
 		co = PyAST_Compile(mod, filename, NULL, arena);

Modified: python/trunk/Python/pyarena.c
==============================================================================
--- python/trunk/Python/pyarena.c	(original)
+++ python/trunk/Python/pyarena.c	Sun Dec 18 16:44:21 2005
@@ -107,8 +107,8 @@
 int
 PyArena_AddMallocPointer(PyArena *arena, void *pointer) 
 {
-  assert(pointer);
   PyArenaList *tail = arena->a_malloc_tail;
+  assert(pointer);
   assert(tail->al_pointer != pointer);
   tail->al_next = PyArenaList_New();
   tail->al_pointer = pointer;
@@ -119,8 +119,8 @@
 int
 PyArena_AddPyObject(PyArena *arena, PyObject *pointer) 
 {
-  assert(pointer);
   PyArenaList *tail = arena->a_object_tail;
+  assert(pointer);
   tail->al_next = PyArenaList_New();
   tail->al_pointer = pointer;
   arena->a_object_tail = tail->al_next;


More information about the Python-checkins mailing list