summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-03-02 21:04:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-03-02 21:04:08 (GMT)
commitcb9426b5f4994c50f7981b9c3753ab7832917d25 (patch)
tree2876ac344983acf698e75e5b0baf728715249ab1 /Include
parent5f4390fb0943c0e8ce857ff91e11b5c19b52b506 (diff)
downloadcpython-cb9426b5f4994c50f7981b9c3753ab7832917d25.zip
cpython-cb9426b5f4994c50f7981b9c3753ab7832917d25.tar.gz
cpython-cb9426b5f4994c50f7981b9c3753ab7832917d25.tar.bz2
Beefed up description of what this does; new XXX.
Diffstat (limited to 'Include')
-rw-r--r--Include/pyarena.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/Include/pyarena.h b/Include/pyarena.h
index 1636556..f5e9eb4 100644
--- a/Include/pyarena.h
+++ b/Include/pyarena.h
@@ -12,8 +12,16 @@ extern "C" {
/* PyArena_New() and PyArena_Free() create a new arena and free it,
respectively. Once an arena has been created, it can be used
- to allocate memory. Once it is freed, all the memory it allocated
- is freed and none of its pointers are valid.
+ to allocate memory via PyArena_Malloc(). Pointers to PyObject can
+ also be registered with the arena via PyArena_AddPyObject(), and the
+ arena will ensure that the PyObjects stay alive at least until
+ PyArena_Free() is called. When an arena is freed, all the memory it
+ allocated is freed, the arena releases internal references to registered
+ PyObject*, and none of its pointers are valid.
+ XXX (tim) What does "none of its pointers are valid" mean? Does it
+ XXX mean that pointers previously obtained via PyArena_Malloc() are
+ XXX no longer valid? (That's clearly true, but not sure that's what
+ XXX the text is trying to say.)
PyArena_New() returns an arena pointer. On error, it
returns a negative number and sets an exception.