Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f4390f

Browse files
committed
New XXX pointing out errors in the description of
PyArena_New(); unsure what the intent is.
1 parent 7eaf2aa commit 5f4390f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Include/pyarena.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ extern "C" {
1717
1818
PyArena_New() returns an arena pointer. On error, it
1919
returns a negative number and sets an exception.
20+
XXX (tim): Not true. On error, PyArena_New() actually returns NULL,
21+
XXX and looks like it may or may not set an exception (e.g., if the
22+
XXX internal PyList_New(0) returns NULL, PyArena_New() passes that on
23+
XXX and an exception is set; OTOH, if the internal
24+
XXX block_new(DEFAULT_BLOCK_SIZE) returns NULL, that's passed on but
25+
XXX an exception is not set in that case).
2026
*/
2127
PyAPI_FUNC(PyArena *) PyArena_New(void);
2228
PyAPI_FUNC(void) PyArena_Free(PyArena *);

0 commit comments

Comments
 (0)