1.1 --- a/translator.py Sat Feb 04 15:35:58 2017 +0100
1.2 +++ b/translator.py Sat Feb 04 16:28:15 2017 +0100
1.3 @@ -20,8 +20,7 @@
1.4 """
1.5
1.6 from common import CommonModule, CommonOutput, InstructionSequence, \
1.7 - first, get_builtin_module, get_builtin_type, init_item, \
1.8 - predefined_constants
1.9 + first, get_builtin_class, init_item, predefined_constants
1.10 from encoders import encode_access_instruction, \
1.11 encode_function_pointer, encode_literal_constant, \
1.12 encode_literal_instantiator, encode_instantiator_pointer, \
1.13 @@ -369,11 +368,7 @@
1.14
1.15 "Return a reference to the actual object providing 'name'."
1.16
1.17 - # NOTE: This makes assumptions about the __builtins__ structure.
1.18 -
1.19 - modname = get_builtin_module(name)
1.20 - typename = get_builtin_type(name)
1.21 - return self.importer.get_object("__builtins__.%s.%s" % (modname, typename))
1.22 + return self.importer.get_object(get_builtin_class(name))
1.23
1.24 def is_method(self, path):
1.25
1.26 @@ -473,8 +468,7 @@
1.27 return self.process_literal_sequence_node(n, name, ref, TrLiteralSequenceRef)
1.28 else:
1.29 value, typename, encoding = self.get_constant_value(n.value, n.literals)
1.30 - name = get_builtin_type(typename)
1.31 - ref = self.get_builtin_class(name)
1.32 + ref = self.get_builtin_class(typename)
1.33 value_type = ref.get_origin()
1.34
1.35 path = self.get_namespace_path()