mirror of
https://github.com/python/cpython.git
synced 2024-11-29 12:54:02 +08:00
fixed compilation with an ordinary C89 compiler
This commit is contained in:
parent
0149e3a090
commit
93d69a7948
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user