From 5b878b6038ac7d8d180f359f728531e666717f94 Mon Sep 17 00:00:00 2001 From: Steeve Morin Date: Thu, 16 Feb 2012 17:15:04 +0100 Subject: Be greedier when checking for tuples or lists. --- msgpack/_msgpack.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'msgpack/_msgpack.pyx') diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx index 52464fb..7f369a8 100644 --- a/msgpack/_msgpack.pyx +++ b/msgpack/_msgpack.pyx @@ -136,7 +136,7 @@ cdef class Packer(object): if ret != 0: break ret = self._pack(v, nest_limit-1) if ret != 0: break - elif PySequence_Check(o): + elif PyTuple_Check(o) or PyList_Check(o): ret = msgpack_pack_array(&self.pk, len(o)) if ret == 0: for v in o: -- cgit v1.2.1