mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
WireCmd: factor code to [de]serialize structs and methods
Methods, when their arguments are stored in a structure, are very similar to structures (duh?) Take advantage of this to factor the [de]serialization code between them and not just memcpy structures around. This will allow structures to contain objects, and pointers to other structures / array of objects etc.
This commit is contained in:
committed by
Corentin Wallez
parent
82565b340f
commit
40e72d79ca
@@ -128,7 +128,8 @@ def link_object(obj, types):
|
||||
if arg.annotation != 'value':
|
||||
if not 'length' in a:
|
||||
if arg.type.category == 'structure':
|
||||
arg.length = "constant_one"
|
||||
arg.length = "constant"
|
||||
arg.constant_length = 1
|
||||
else:
|
||||
assert(false)
|
||||
elif a['length'] == 'strlen':
|
||||
|
||||
Reference in New Issue
Block a user