From 628c5191873148a8372bae4ee99454ad13b7b492 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Tue, 10 Nov 2015 03:41:09 +0900 Subject: strict type check for ext type --- msgpack/_packer.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'msgpack') diff --git a/msgpack/_packer.pyx b/msgpack/_packer.pyx index c8d4fd1..7c1e53d 100644 --- a/msgpack/_packer.pyx +++ b/msgpack/_packer.pyx @@ -213,7 +213,7 @@ cdef class Packer(object): if ret != 0: break ret = self._pack(v, nest_limit-1) if ret != 0: break - elif isinstance(o, ExtType): + elif type(o) is ExtType if strict_types else isinstance(o, ExtType): # This should be before Tuple because ExtType is namedtuple. longval = o.code rawval = o.data -- cgit v1.2.1