comparison Modules/arraymodule.c @ 79803:d2127cdec10e

Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified endianess detection and handling.
author Christian Heimes <christian@cheimes.de>
date Wed, 17 Oct 2012 23:52:17 +0200
parents 152d85b2da3a
children bc322469a7a8
comparison
equal deleted inserted replaced
79802:943d3e289ab4 79803:d2127cdec10e
1662 * be found. 1662 * be found.
1663 */ 1663 */
1664 static enum machine_format_code 1664 static enum machine_format_code
1665 typecode_to_mformat_code(char typecode) 1665 typecode_to_mformat_code(char typecode)
1666 { 1666 {
1667 #ifdef WORDS_BIGENDIAN 1667 const int is_big_endian = PY_BIG_ENDIAN;
1668 const int is_big_endian = 1; 1668
1669 #else
1670 const int is_big_endian = 0;
1671 #endif
1672 size_t intsize; 1669 size_t intsize;
1673 int is_signed; 1670 int is_signed;
1674 1671
1675 switch (typecode) { 1672 switch (typecode) {
1676 case 'b': 1673 case 'b':