summaryrefslogtreecommitdiff
path: root/msgpack/_unpacker.pyx
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2018-02-22 00:55:32 +0900
committerGitHub <noreply@github.com>2018-02-22 00:55:32 +0900
commitda902f9c1d996fb461f1efef6487ef40d32d365a (patch)
tree746e7ce2f15941c1e0251c10bd95e1f0774dab4b /msgpack/_unpacker.pyx
parentae8d4694829d5b58d613c588c30e29dd29860c4f (diff)
downloadmsgpack-python-da902f9c1d996fb461f1efef6487ef40d32d365a.tar.gz
Move unpack() from each implementation to __init__. (#286)
Fixes #285
Diffstat (limited to 'msgpack/_unpacker.pyx')
-rw-r--r--msgpack/_unpacker.pyx26
1 files changed, 0 insertions, 26 deletions
diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx
index fb58490..25a7401 100644
--- a/msgpack/_unpacker.pyx
+++ b/msgpack/_unpacker.pyx
@@ -211,32 +211,6 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
raise UnpackValueError("Unpack failed: error = %d" % (ret,))
-def unpack(object stream, object object_hook=None, object list_hook=None,
- bint use_list=1, encoding=None, unicode_errors=None,
- object_pairs_hook=None, ext_hook=ExtType,
- Py_ssize_t max_str_len=2147483647, # 2**32-1
- Py_ssize_t max_bin_len=2147483647,
- Py_ssize_t max_array_len=2147483647,
- Py_ssize_t max_map_len=2147483647,
- Py_ssize_t max_ext_len=2147483647):
- """
- Unpack an object from `stream`.
-
- Raises `ValueError` when `stream` has extra bytes.
-
- See :class:`Unpacker` for options.
- """
- return unpackb(stream.read(), use_list=use_list,
- object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook,
- encoding=encoding, unicode_errors=unicode_errors, ext_hook=ext_hook,
- max_str_len=max_str_len,
- max_bin_len=max_bin_len,
- max_array_len=max_array_len,
- max_map_len=max_map_len,
- max_ext_len=max_ext_len,
- )
-
-
cdef class Unpacker(object):
"""Streaming unpacker.