summaryrefslogtreecommitdiff
path: root/msgpack
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2015-11-10 03:41:09 +0900
committerINADA Naoki <songofacandy@gmail.com>2015-11-10 03:41:09 +0900
commit628c5191873148a8372bae4ee99454ad13b7b492 (patch)
tree4fbc84003142cc1f74c79570000a08ea8381c361 /msgpack
parent9b673279d36468e3334b513b5e86d40cba4c4acc (diff)
downloadmsgpack-python-628c5191873148a8372bae4ee99454ad13b7b492.tar.gz
strict type check for ext type
Diffstat (limited to 'msgpack')
-rw-r--r--msgpack/_packer.pyx2
1 files changed, 1 insertions, 1 deletions
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