From c176a809f8cefb4745828d7feb4471c365f376c5 Mon Sep 17 00:00:00 2001 From: "daniloaf@daniloaf-PC" Date: Sat, 30 Jan 2010 15:39:29 -0300 Subject: [PATCH] Fixed bug on subclass instanciation and using 'del' on templates compile test --- Cython/Compiler/PyrexTypes.py | 3 ++- tests/compile/cpp_templates.pyx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index e7c1141c..0b7592fb 100755 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -1,4 +1,5 @@ + # # Pyrex - Types # @@ -1879,7 +1880,7 @@ class CppClassType(CType): if other_type.is_cpp_class: if self == other_type: return 1 - elif self.template_type == other_type.template_type: + elif self.template_type and self.template_type == other_type.template_type: if self.templates == other_type.templates: return 1 for t1, t2 in zip(self.templates, other_type.templates): diff --git a/tests/compile/cpp_templates.pyx b/tests/compile/cpp_templates.pyx index 2476a530..7fba995f 100644 --- a/tests/compile/cpp_templates.pyx +++ b/tests/compile/cpp_templates.pyx @@ -26,3 +26,5 @@ c = e.getValue2() cdef char f = d.getValue2() f = e.getValue2() + +del b, e -- 2.26.2