fix string constants defined in extension classes
authorStefan Behnel <scoder@users.berlios.de>
Tue, 22 Apr 2008 16:45:31 +0000 (18:45 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 22 Apr 2008 16:45:31 +0000 (18:45 +0200)
Cython/Compiler/Nodes.py

index c17f332a32bbd092326e9e4ff464ac990d1b1b0e..b87264fed9f9bb6715f2457236f03577fb594225 100644 (file)
@@ -1965,7 +1965,7 @@ class PyClassDefNode(StatNode, BlockNode):
         self.dict.generate_disposal_code(code)
 
 
-class CClassDefNode(StatNode):
+class CClassDefNode(StatNode, BlockNode):
     #  An extension type definition.
     #
     #  visibility         'private' or 'public' or 'extern'
@@ -2058,6 +2058,7 @@ class CClassDefNode(StatNode):
             self.body.analyse_expressions(scope)
     
     def generate_function_definitions(self, env, code, transforms):
+        self.generate_py_string_decls(self.entry.type.scope, code)
         if self.body:
             self.body.generate_function_definitions(
                 self.entry.type.scope, code, transforms)