From: Craig Citro Date: Sat, 13 Mar 2010 05:21:10 +0000 (-0800) Subject: Fix error creating C++ class X-Git-Tag: 0.13.beta0~320 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cec8145deb597e9f357f9918b77bcae638df692a;p=cython.git Fix error creating C++ class --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index f5da2453..9408693f 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -1026,7 +1026,7 @@ class CppClassNode(CStructOrUnionDefNode): def analyse_declarations(self, env): scope = None - if len(self.attributes) != 0: + if self.attributes: scope = CppClassScope(self.name, env) else: self.attributes = None diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 464fab90..9a4dd21e 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -423,8 +423,6 @@ class Scope(object): if scope: entry.type.scope = scope self.type_entries.append(entry) - if not scope and not entry.type.scope: - entry.type.scope = CppClassScope(name, self) if templates is not None: for T in templates: template_entry = entry.type.scope.declare(T.name, T.name, T, None, 'extern')