From: Lisandro Dalcin Date: Fri, 17 Oct 2008 18:21:49 +0000 (-0300) Subject: do not emit type_test_utility_code when type-testing builtin types X-Git-Tag: 0.9.9.2.beta~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b8fa1e46157d88de5d36359dfe1961521e9a2f16;p=cython.git do not emit type_test_utility_code when type-testing builtin types --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index ba049fff..d9faada4 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -4367,7 +4367,8 @@ class PyTypeTestNode(CoercionNode): self.type = dst_type self.gil_check(env) self.result_ctype = arg.ctype() - env.use_utility_code(type_test_utility_code) + if not dst_type.is_builtin_type: + env.use_utility_code(type_test_utility_code) gil_message = "Python type test"