Commit 46e443be authored by Stefan Behnel's avatar Stefan Behnel

more missing 'directives' dicts, 'bool' actually is final in CPython

parent 4ef3dcb6
......@@ -1072,6 +1072,7 @@ class CComplexType(CNumericType):
None,
visibility="extern")
scope.parent_type = self
scope.directives = {}
scope.declare_var("real", self.real_type, None, "real", is_cdef=True)
scope.declare_var("imag", self.real_type, None, "imag", is_cdef=True)
entry = scope.declare_cfunction(
......
......@@ -726,7 +726,11 @@ class BuiltinScope(Scope):
def declare_builtin_type(self, name, cname, utility_code = None):
name = EncodedString(name)
type = PyrexTypes.BuiltinObjectType(name, cname)
type.set_scope(CClassScope(name, outer_scope=None, visibility='extern'))
scope = CClassScope(name, outer_scope=None, visibility='extern')
scope.directives = {}
if name == 'bool':
scope.directives['final'] = True
type.set_scope(scope)
self.type_names[name] = 1
entry = self.declare_type(name, type, None, visibility='extern')
entry.utility_code = utility_code
......
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