diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-21 11:29:51 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-21 11:29:51 (GMT) |
| commit | 8455723cfb0cdb0fc8d908210fa21b63b9d09a2b (patch) | |
| tree | 6737c78cb32d1de8f37d1fb6109088b704b37ea2 /Python/graminit.c | |
| parent | 35f2803a2454231de6c0c29e91a819c847e4da18 (diff) | |
| download | cpython-8455723cfb0cdb0fc8d908210fa21b63b9d09a2b.zip cpython-8455723cfb0cdb0fc8d908210fa21b63b9d09a2b.tar.gz cpython-8455723cfb0cdb0fc8d908210fa21b63b9d09a2b.tar.bz2 | |
Close #19568: Fix bytearray_setslice_linear(), fix handling of
PyByteArray_Resize() failure: leave the bytearray object in an consistent state.
If growth < 0, handling the memory allocation failure is tricky here because
the bytearray object has already been modified. If lo != 0, the operation is
completed, but a MemoryError is still raised and the memory block is not
shrinked. If lo == 0, the bytearray is restored in its previous state and a
MemoryError is raised.
Diffstat (limited to 'Python/graminit.c')
0 files changed, 0 insertions, 0 deletions
