mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
Unpacker: maintain refcnt (fix #67).
This commit is contained in:
parent
cf63f19211
commit
6d80569b9b
1 changed files with 6 additions and 1 deletions
|
|
@ -206,7 +206,8 @@ cdef class Unpacker(object):
|
|||
cdef object file_like
|
||||
cdef object file_like_read
|
||||
cdef Py_ssize_t read_size
|
||||
cdef object object_hook
|
||||
# To maintain refcnt.
|
||||
cdef object object_hook, object_pairs_hook, list_hook
|
||||
cdef object encoding, unicode_errors
|
||||
cdef size_t max_buffer_size
|
||||
|
||||
|
|
@ -224,6 +225,10 @@ cdef class Unpacker(object):
|
|||
cdef char *cenc=NULL,
|
||||
cdef char *cerr=NULL
|
||||
|
||||
self.object_hook = object_hook
|
||||
self.object_pairs_hook = object_pairs_hook
|
||||
self.list_hook = list_hook
|
||||
|
||||
self.file_like = file_like
|
||||
if file_like:
|
||||
self.file_like_read = file_like.read
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue