- for i, l in enumerate(paramlist_re.split(data)):
- l=l.strip()
- if l.startswith('/*') or l.startswith('#'):
- continue
- if '=' in l:
- # A value was specified. Use it.
- values.append(re.split('\s*=\s*', l))
- else:
- if l:
- values.append( (l, str(i)) )
+ if event_names:
+ # event_names were defined through DEF macro
+ # (see 96a96f60bb0d1f2506e68b356897ceca6f6b586d)
+ values=list( (n, str(i)) for i, n in enumerate(event_names))
+ else:
+ # Before 96a96f60bb0d1f2506e68b356897ceca6f6b586d
+ values=[]
+ for i, l in enumerate(paramlist_re.split(data)):
+ l=l.strip()
+ if l.startswith('/*') or l.startswith('#'):
+ continue
+ if '=' in l:
+ # A value was specified. Use it.
+ values.append(re.split('\s*=\s*', l))
+ else:
+ if l:
+ values.append( (l, str(i)) )