summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-06-14 18:42:50 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-06-14 18:42:50 (GMT)
commitcf37dfc3dba1040b982ca4b39a5728c9d26e7cf7 (patch)
tree2d408c1a756ecae114d1935e4c2f3ef4e883bd1e /Objects
parentad98db1d9e15df8cda494fffec68f9cf59ed073f (diff)
downloadcpython-cf37dfc3dba1040b982ca4b39a5728c9d26e7cf7.zip
cpython-cf37dfc3dba1040b982ca4b39a5728c9d26e7cf7.tar.gz
cpython-cf37dfc3dba1040b982ca4b39a5728c9d26e7cf7.tar.bz2
Change IS_LITTLE_ENDIAN macro -- a little faster now.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 250db7c..be9430a 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -562,7 +562,7 @@ PyLong_AsVoidPtr(PyObject *vv)
* rewritten to use the newer PyLong_{As,From}ByteArray API.
*/
-#define IS_LITTLE_ENDIAN *(char*)&one != '\0'
+#define IS_LITTLE_ENDIAN (int)*(unsigned char*)&one
/* Create a new long int object from a C LONG_LONG int. */