summaryrefslogtreecommitdiffstats
path: root/Python/asdl.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:58:27 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-02-28 17:58:27 (GMT)
commita829313d7b966caa1f6badce73873a1da4c2258c (patch)
treef50bc306d5c36bf6cfce4e3051c13c410810cd84 /Python/asdl.c
parent03bdedd574beaa880e1bbd31034dd840e6a4f8be (diff)
downloadcpython-a829313d7b966caa1f6badce73873a1da4c2258c.zip
cpython-a829313d7b966caa1f6badce73873a1da4c2258c.tar.gz
cpython-a829313d7b966caa1f6badce73873a1da4c2258c.tar.bz2
Remove asdl_seq_APPEND() and simplify asdl seq implementation.
Clarify intended use of set_context() and check errors at all call sites.
Diffstat (limited to 'Python/asdl.c')
-rw-r--r--Python/asdl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Python/asdl.c b/Python/asdl.c
index ccd8714..225df6e 100644
--- a/Python/asdl.c
+++ b/Python/asdl.c
@@ -8,18 +8,12 @@ asdl_seq_new(int size, PyArena *arena)
size_t n = sizeof(asdl_seq) +
(size ? (sizeof(void *) * (size - 1)) : 0);
- seq = (asdl_seq *)malloc(n);
+ seq = (asdl_seq *)PyArena_Malloc(arena, n);
if (!seq) {
PyErr_NoMemory();
return NULL;
}
- PyArena_AddMallocPointer(arena, (void *)seq);
memset(seq, 0, n);
seq->size = size;
return seq;
}
-
-void
-asdl_seq_free(asdl_seq *seq)
-{
-}