From: Stefan Behnel Date: Tue, 22 Apr 2008 16:45:31 +0000 (+0200) Subject: fix string constants defined in extension classes X-Git-Tag: 0.9.6.14~20^2~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13178de71d1d7c9a5bbfe65eaf922729bf1e6871;p=cython.git fix string constants defined in extension classes --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index c17f332a..b87264fe 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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)