10000 Unpacker: maintain refcnt (fix #67). · imclab/msgpack-python@6d80569 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6d80569

Browse files
committed
Unpacker: maintain refcnt (fix msgpack#67).
1 parent cf63f19 commit 6d80569

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

msgpack/_unpacker.pyx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ cdef class Unpacker(object):
206206
cdef object file_like
207207
cdef object file_like_read
208208
cdef Py_ssize_t read_size
209-
cdef object object_hook
209+
# To maintain refcnt.
210+
cdef object object_hook, object_pairs_hook, list_hook
210211
cdef object encoding, unicode_errors
211212
cdef size_t max_buffer_size
212213

@@ -224,6 +225,10 @@ cdef class Unpacker(object):
224225
cdef char *cenc=NULL,
225226
cdef char *cerr=NULL
226227

228+
self.object_hook = object_hook
229+
self.object_pairs_hook = object_pairs_hook
230+
self.list_hook = list_hook
231+
227232
self.file_like = file_like
228233
if file_like:
229234
self.file_like_read = file_like.read

0 commit comments

Comments
 (0)
0