Skip to content

Commit 89ea577

Browse files
authored
Don't define __*_ENDIAN__ macro on Unix. (#495)
1 parent bdf0511 commit 89ea577

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: msgpack/fallback.py

-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
def dict_iteritems(d):
1212
return d.iteritems()
1313

14-
1514
else:
1615
int_types = int
1716
unicode = str
@@ -32,7 +31,6 @@ def _is_recursionerror(e):
3231
and e.args[0].startswith("maximum recursion depth exceeded")
3332
)
3433

35-
3634
else:
3735

3836
def _is_recursionerror(e):
@@ -68,7 +66,6 @@ def write(self, s):
6866
def getvalue(self):
6967
return self.builder.build()
7068

71-
7269
else:
7370
USING_STRINGBUILDER = False
7471
from io import BytesIO as StringIO
@@ -143,7 +140,6 @@ def _unpack_from(f, b, o=0):
143140
"""Explicit type cast for legacy struct.unpack_from"""
144141
return struct.unpack_from(f, bytes(b), o)
145142

146-
147143
else:
148144
_unpack_from = struct.unpack_from
149145

Diff for: setup.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,10 @@ def __init__(self, *args, **kwargs):
7979

8080

8181
libraries = []
82+
macros = []
83+
8284
if sys.platform == "win32":
8385
libraries.append("ws2_32")
84-
85-
if sys.byteorder == "big":
86-
macros = [("__BIG_ENDIAN__", "1")]
87-
else:
8886
macros = [("__LITTLE_ENDIAN__", "1")]
8987

9088
ext_modules = []

0 commit comments

Comments
 (0)