mirror of
https://github.com/python/cpython
synced 2024-10-15 00:44:42 +00:00
Change IS_LITTLE_ENDIAN macro -- a little faster now.
This commit is contained in:
parent
ad98db1d9e
commit
cf37dfc3db
|
@ -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. */
|
||||
|
||||
|
|
Loading…
Reference in a new issue