Fix class in template specialization.
authorRobert Bradshaw <robertwb@math.washington.edu>
Thu, 4 Feb 2010 21:57:58 +0000 (13:57 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Thu, 4 Feb 2010 21:57:58 +0000 (13:57 -0800)
Cython/Compiler/PyrexTypes.py

index e60ced01a67731ad01e19ca5643adbb7bca3cfd7..4f068ace33fe86658f082b8c56f6f7e9ceabdb80 100755 (executable)
@@ -1846,6 +1846,8 @@ class CppClassType(CType):
         return self.specialize(dict(zip(self.templates, template_values)))
     
     def specialize(self, values):
+        if not self.templates:
+            return self
         key = tuple(values.items())
         if key in self.specializations:
             return self.specializations[key]