mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
bb2095f1e2
commit
eeb7eea1f9
13 changed files with 271 additions and 87 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue