Two events produce different internal names than the event name itself. This was causing the reused names for these events to increase memory usage instead of reducing it. Fixed.

This commit is contained in:
Sei Lisa 2015-08-21 01:20:28 +02:00
parent f8a6d3d86c
commit e264260477

View file

@ -111,7 +111,17 @@ class renamer(object):
# Find also the event names it uses, to add them for reuse. # Find also the event names it uses, to add them for reuse.
for node in self.tree[entry['Loc']]['ch']: for node in self.tree[entry['Loc']]['ch']:
assert node['nt'] == 'FNDEF' assert node['nt'] == 'FNDEF'
ReusableNames.add('e' + name + node['name']) event_name = node['name']
# These two events have their names translated.
if event_name == 'on_rez':
event_name = 'rez'
if event_name == 'listen':
event_name = 'chat'
# This one doesn't seem to be renamed internally any longer,
# even though the viewer sources indicate so:
#if event_name == 'changed':
# event_name = 'inventory'
ReusableNames.add('e' + name + event_name)
del states del states
for name in functions: for name in functions: