Commit d51512a0 authored by Stefan Behnel's avatar Stefan Behnel

make builtin scope recognisable

parent 37d48844
...@@ -211,6 +211,7 @@ class Scope(object): ...@@ -211,6 +211,7 @@ class Scope(object):
# cname_to_entry {string : Entry} Temp cname to entry mapping # cname_to_entry {string : Entry} Temp cname to entry mapping
# int_to_entry {int : Entry} Temp cname to entry mapping # int_to_entry {int : Entry} Temp cname to entry mapping
# return_type PyrexType or None Return type of function owning scope # return_type PyrexType or None Return type of function owning scope
# is_builtin_scope boolean Is the builtin scope of Python/Cython
# is_py_class_scope boolean Is a Python class scope # is_py_class_scope boolean Is a Python class scope
# is_c_class_scope boolean Is an extension type scope # is_c_class_scope boolean Is an extension type scope
# is_closure_scope boolean Is a closure scope # is_closure_scope boolean Is a closure scope
...@@ -228,6 +229,7 @@ class Scope(object): ...@@ -228,6 +229,7 @@ class Scope(object):
# analysis, contains directive values. # analysis, contains directive values.
# is_internal boolean Is only used internally (simpler setup) # is_internal boolean Is only used internally (simpler setup)
is_builtin_scope = 0
is_py_class_scope = 0 is_py_class_scope = 0
is_c_class_scope = 0 is_c_class_scope = 0
is_closure_scope = 0 is_closure_scope = 0
...@@ -733,6 +735,8 @@ class PreImportScope(Scope): ...@@ -733,6 +735,8 @@ class PreImportScope(Scope):
class BuiltinScope(Scope): class BuiltinScope(Scope):
# The builtin namespace. # The builtin namespace.
is_builtin_scope = True
def __init__(self): def __init__(self):
if Options.pre_import is None: if Options.pre_import is None:
Scope.__init__(self, "__builtin__", None, None) Scope.__init__(self, "__builtin__", None, None)
......
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