Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't define __*_ENDIAN__ macro on Unix.
  • Loading branch information
methane committed Jan 19, 2022
commit 2225a6657da02a0349b17f896a4b0a473bbd057c
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