do not emit type_test_utility_code when type-testing builtin types
authorLisandro Dalcin <dalcinl@gmail.com>
Fri, 17 Oct 2008 18:21:49 +0000 (15:21 -0300)
committerLisandro Dalcin <dalcinl@gmail.com>
Fri, 17 Oct 2008 18:21:49 +0000 (15:21 -0300)
Cython/Compiler/ExprNodes.py

index ba049fff4f7b7754cbe421eaffbdc9719928c911..d9faada43d17432e87f49e3efb66f006fa6f98bc 100644 (file)
@@ -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"