make CTypedefType.declaration_code() honor dll_linkage
authorLisandro Dalcin <dalcinl@gmail.com>
Fri, 13 Nov 2009 20:50:34 +0000 (18:50 -0200)
committerLisandro Dalcin <dalcinl@gmail.com>
Fri, 13 Nov 2009 20:50:34 +0000 (18:50 -0200)
Cython/Compiler/PyrexTypes.py

index a50760a4e1072bba4001a4fef533bc428bb5abf1..a45a180abc9523f95b7048d2fbd6885828c92ecb 100644 (file)
@@ -202,7 +202,11 @@ class CTypedefType(BaseType):
     def declaration_code(self, entity_code, 
             for_display = 0, dll_linkage = None, pyrex = 0):
         name = self.declaration_name(for_display, pyrex)
-        return self.base_declaration_code(name, entity_code)
+        if pyrex or for_display:
+            base_code = name
+        else:
+            base_code = public_decl(name, dll_linkage)
+        return self.base_declaration_code(base_code, entity_code)
     
     def declaration_name(self, for_display = 0, pyrex = 0):
         if pyrex or for_display: