mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 14:45:48 +00:00
qapi-visit: Replace list implicit_structs by set
Use set because that's what it is. While there, rename to implicit_structs_seen. Backports commit 8c07eddc619d618965fdd7a96bfe3b5c59f42b52 from qemu
This commit is contained in:
parent
23d14a2921
commit
54ce4b3f00
|
@ -16,14 +16,13 @@ from ordereddict import OrderedDict
|
|||
from qapi import *
|
||||
import re
|
||||
|
||||
implicit_structs = []
|
||||
implicit_structs_seen = set()
|
||||
struct_fields_seen = set()
|
||||
|
||||
def generate_visit_implicit_struct(type):
|
||||
global implicit_structs
|
||||
if type in implicit_structs:
|
||||
if type in implicit_structs_seen:
|
||||
return ''
|
||||
implicit_structs.append(type)
|
||||
implicit_structs_seen.add(type)
|
||||
ret = ''
|
||||
if type not in struct_fields_seen:
|
||||
# Need a forward declaration
|
||||
|
|
Loading…
Reference in a new issue