]> granicus.if.org Git - python/commit
Bytes (which are the input for decoding) are mutable now. If a decoding
authorWalter Dörwald <walter@livinglogic.de>
Mon, 30 Jul 2007 13:31:40 +0000 (13:31 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Mon, 30 Jul 2007 13:31:40 +0000 (13:31 +0000)
commite78178e2c05ec2bb628b70a8b5422bb4dae63343
treed1c8662e41b7f8f95714bc903ad048a01673c369
parent2dbde5ea444de788721e9195d644da38061204c3
Bytes (which are the input for decoding) are mutable now. If a decoding
error callback changes the bytes object in the exception the decoder might
use memory that's no longer in use. Change unicode_decode_call_errorhandler()
so that it fetches the adresses of the bytes array (start and end) from the
exception object and passes them back to the caller.
Lib/test/test_codeccallbacks.py
Objects/unicodeobject.c