mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-28 00:58:09 +00:00
Use const() for protobuf definitions
This commit is contained in:
parent
8eff4fcddf
commit
f5d2007297
@ -12,9 +12,9 @@ def process_type(t, cls, msg_id, indexfile):
|
|||||||
out = ["t = p.MessageType('%s')" % t, ]
|
out = ["t = p.MessageType('%s')" % t, ]
|
||||||
|
|
||||||
if msg_id is not None:
|
if msg_id is not None:
|
||||||
out.append("t.wire_type = %d" % msg_id)
|
out.append("t.wire_type = const(%d)" % msg_id)
|
||||||
if indexfile is not None:
|
if indexfile is not None:
|
||||||
indexfile.write("%s = %d\n" % (t, msg_id))
|
indexfile.write("%s = const(%d)\n" % (t, msg_id))
|
||||||
|
|
||||||
print(" * type %s" % t)
|
print(" * type %s" % t)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user