Visitar URL original
Alternate fixes for jython and legacy c python. by devendor · Pull Request #310 · msgpack/msgpack-python · GitHub
Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix failed test.
  • Loading branch information
devendor committed Oct 1, 2018
commit b86a1b8e235659e4ec6412465ceac27e47a708d2
3 changes: 2 additions & 1 deletion msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def unpackb(packed, **kwargs):

if sys.version < (2, 7, 6):
def _unpack_from(f, b, o=0):
return struct.unpack_from(f, bytes(b[:o+2]), o)
"""Explicit typcast for legacy struct.unpack_from"""
return struct.unpack_from(f, bytes(b), o)
else:
_unpack_from = struct.unpack_from

Expand Down