8000 Merge pull request #143 from emulbreh/pass-ext-hook · kazuki/msgpack-python@aa209ab · GitHub
[go: up one dir, main page]

Skip to content

Commit aa209ab

Browse files
committed
Merge pull request msgpack#143 from emulbreh/pass-ext-hook
Accept ext_hook for unpack()
2 parents d816aa8 + 4eb4c7a commit aa209ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

msgpack/_unpacker.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
147147

148148
def unpack(object stream, object object_hook=None, object list_hook=None,
149149
bint use_list=1, encoding=None, unicode_errors="strict",
150-
object_pairs_hook=None,
150+
object_pairs_hook=None, ext_hook=ExtType
151151
):
152152
"""
153153
Unpack an object from `stream`.
@@ -158,7 +158,7 @@ def unpack(object stream, object object_hook=None, object list_hook=None,
158158
"""
159159
return unpackb(stream.read(), use_list=use_list,
160160
object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook,
161-
encoding=encoding, unicode_errors=unicode_errors,
161+
encoding=encoding, unicode_errors=unicode_errors, ext_hook=ext_hook
162162
)
163163

164164

0 commit comments

Comments
 (0)
0