Commit 153a2217 authored by Stefan Behnel's avatar Stefan Behnel

avoid duplication of "stringsource" entries in filename table

--HG--
extra : amend_source : c0a1e78dbfd443585a80bd646b763617eeb6b7c5
parent 235aaa7a
...@@ -1317,13 +1317,13 @@ class GlobalState(object): ...@@ -1317,13 +1317,13 @@ class GlobalState(object):
# File name state # File name state
# #
def lookup_filename(self, filename): def lookup_filename(self, source_desc):
try: try:
index = self.filename_table[filename] index = self.filename_table[source_desc.get_filenametable_entry()]
except KeyError: except KeyError:
index = len(self.filename_list) index = len(self.filename_list)
self.filename_list.append(filename) self.filename_list.append(source_desc)
self.filename_table[filename] = index self.filename_table[source_desc.get_filenametable_entry()] = index
return index return index
def commented_file_contents(self, source_desc): def commented_file_contents(self, source_desc):
......
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