From b8fa1e46157d88de5d36359dfe1961521e9a2f16 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 17 Oct 2008 15:21:49 -0300 Subject: [PATCH] do not emit type_test_utility_code when type-testing builtin types --- Cython/Compiler/ExprNodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" -- 2.26.2