fixed compilation with an ordinary C89 compiler

This commit is contained in:
Fredrik Lundh 2005-12-18 15:44:21 +00:00
parent 0149e3a090
commit 93d69a7948
2 changed files with 3 additions and 4 deletions

View file

@ -296,8 +296,7 @@ PyCodeObject *
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);

View file

@ -107,8 +107,8 @@ PyArena_Malloc(PyArena *arena, size_t size)
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 @@ PyArena_AddMallocPointer(PyArena *arena, void *pointer)
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;