Commit cec8145d authored by Craig Citro's avatar Craig Citro

Fix error creating C++ class

parent 31d3224c
......@@ -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
......
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment