Skip to content

Commit

Permalink
Don't define __*_ENDIAN__ macro on Unix.
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jan 19, 2022
1 parent bdf0511 commit 2225a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
def dict_iteritems(d):
return d.iteritems()


else:
int_types = int
unicode = str
Expand All @@ -32,7 +31,6 @@ def _is_recursionerror(e):
and e.args[0].startswith("maximum recursion depth exceeded")
)


else:

def _is_recursionerror(e):
Expand Down Expand Up @@ -68,7 +66,6 @@ def write(self, s):
def getvalue(self):
return self.builder.build()


else:
USING_STRINGBUILDER = False
from io import BytesIO as StringIO
Expand Down Expand Up @@ -143,7 +140,6 @@ def _unpack_from(f, b, o=0):
"""Explicit type cast for legacy struct.unpack_from"""
return struct.unpack_from(f, bytes(b), o)


else:
_unpack_from = struct.unpack_from

Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ def __init__(self, *args, **kwargs):


libraries = []
macros = []

if sys.platform == "win32":
libraries.append("ws2_32")

if sys.byteorder == "big":
macros = [("__BIG_ENDIAN__", "1")]
else:
macros = [("__LITTLE_ENDIAN__", "1")]

ext_modules = []
Expand Down

0 comments on commit 2225a66

Please sign in to comment.