summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-10-17 21:52:17 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-10-17 21:52:17 (GMT)
commit743e0cd6b5d59767aae2524700857f188ca1e80e (patch)
tree89897c0424a3b361e04d451e2b3a64e5c7c17756 /Modules/arraymodule.c
parent1e9af84e2ef41115dd07d00b57e5a2a7041bfeed (diff)
downloadcpython-743e0cd6b5d59767aae2524700857f188ca1e80e.zip
cpython-743e0cd6b5d59767aae2524700857f188ca1e80e.tar.gz
cpython-743e0cd6b5d59767aae2524700857f188ca1e80e.tar.bz2
Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
endianess detection and handling.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 3f5aa8b..4d4c2ae 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;