From ddba4f1e3397ccd0897097cb3f28a96443005afd Mon Sep 17 00:00:00 2001
From: Stefan Behnel <scoder@users.berlios.de>
Date: Sun, 7 Aug 2011 18:05:35 +0200
Subject: [PATCH] fix type inheritance check for builtin types

---
 Cython/Compiler/PyrexTypes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py
index 575c96d50..1feeeabd7 100755
--- a/Cython/Compiler/PyrexTypes.py
+++ b/Cython/Compiler/PyrexTypes.py
@@ -445,7 +445,7 @@ class BuiltinObjectType(PyObjectType):
         return True
 
     def subtype_of(self, type):
-        return type.is_pyobject and self.assignable_from(type)
+        return type.is_pyobject and type.assignable_from(self)
 
     def type_check_function(self, exact=True):
         type_name = self.name
-- 
2.30.9