Fix auto-generated code didn't actually write int128/int256

This commit is contained in:
Lonami Exo 2017-09-28 10:01:09 +02:00
parent fb0898b9cb
commit 748c2560de

View File

@ -484,10 +484,10 @@ class TLGenerator:
builder.write("struct.pack('<q', {})".format(name))
elif 'int128' == arg.type:
builder.write("int.to_bytes({}, 16, 'little', signed=True)")
builder.write("{}.to_bytes(16, 'little', signed=True)".format(name))
elif 'int256' == arg.type:
builder.write("int.to_bytes({}, 32, 'little', signed=True)")
builder.write("{}.to_bytes(32, 'little', signed=True)".format(name))
elif 'double' == arg.type:
builder.write("struct.pack('<d', {})".format(name))