mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
tools: simplify check
in this case, we always need a pointer, so remove the check and just add it to the template
This commit is contained in:
parent
254ee8a5d3
commit
118caae45b
1 changed files with 2 additions and 3 deletions
|
@ -978,9 +978,8 @@ class Subtype(Message):
|
||||||
s = '{}->{} = fromwire_{}(cursor, plen);'.format(
|
s = '{}->{} = fromwire_{}(cursor, plen);'.format(
|
||||||
self.name, f.name, basetype)
|
self.name, f.name, basetype)
|
||||||
else:
|
else:
|
||||||
ref = '&' if f.fieldtype.needs_ptr() else ''
|
s = 'fromwire_{}(cursor, plen, &{}->{});'.format(
|
||||||
s = 'fromwire_{}(cursor, plen, {}{}->{});'.format(
|
basetype, self.name, f.name)
|
||||||
basetype, ref, self.name, f.name)
|
|
||||||
subcalls.append(s)
|
subcalls.append(s)
|
||||||
|
|
||||||
return template.format(
|
return template.format(
|
||||||
|
|
Loading…
Add table
Reference in a new issue