diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-02-26 00:27:56 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-02-26 00:27:56 +0100 |
commit | ff36628912148b1d53fbf7418f6cce6931f7ffba (patch) | |
tree | f6b0e8ed3b1e4e40c141c6e9bb0dc0618dd70d05 /Modules/arraymodule.c | |
parent | 0554d015fd719d90d5cc0aa51140adbe6a2bf16c (diff) | |
parent | 08cde967a3aa64f6ec8b490d8c9de470b1429a14 (diff) | |
download | cpython-ff36628912148b1d53fbf7418f6cce6931f7ffba.tar.gz |
(Merge 3.3) Issue #17223: array module: Fix a crasher when converting an array
containing invalid characters (outside range [U+0000; U+10ffff]) to Unicode:
repr(array), str(array) and array.tounicode(). Patch written by Manuel Jacob.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 96c9e5bba7..1c759899f5 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1664,11 +1664,8 @@ static const struct mformatdescr { static enum machine_format_code typecode_to_mformat_code(char typecode) { -#ifdef WORDS_BIGENDIAN - const int is_big_endian = 1; -#else - const int is_big_endian = 0; -#endif + const int is_big_endian = PY_BIG_ENDIAN; + size_t intsize; int is_signed; |