diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-06 16:57:27 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-06 16:57:27 (GMT) |
commit | eeb7eea1f95793437b3e251f47c98446e15fa680 (patch) | |
tree | e83a45f7eddbc424f375a89581a918baf2a42dcd /Include/Python.h | |
parent | bb2095f1e273d06f7dfaa8303c46ce6f01212c76 (diff) | |
download | cpython-eeb7eea1f95793437b3e251f47c98446e15fa680.zip cpython-eeb7eea1f95793437b3e251f47c98446e15fa680.tar.gz cpython-eeb7eea1f95793437b3e251f47c98446e15fa680.tar.bz2 |
Issue #12911: Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
Diffstat (limited to 'Include/Python.h')
-rw-r--r-- | Include/Python.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/Python.h b/Include/Python.h index db33a76..5972ffa 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -100,7 +100,7 @@ #include "warnings.h" #include "weakrefobject.h" #include "structseq.h" - +#include "accu.h" #include "codecs.h" #include "pyerrors.h" @@ -141,7 +141,7 @@ PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name); #endif /* Argument must be a char or an int in [-128, 127] or [0, 255]. */ -#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff)) +#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff)) #include "pyfpe.h" |