From 13178de71d1d7c9a5bbfe65eaf922729bf1e6871 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 22 Apr 2008 18:45:31 +0200 Subject: [PATCH] fix string constants defined in extension classes --- Cython/Compiler/Nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.26.2