Rename constructor/subclass_of_id to upper case, keep only static

This commit is contained in:
Lonami Exo
2017-09-29 13:11:33 +02:00
parent b3f04fd359
commit afc4bd9cab
7 changed files with 17 additions and 17 deletions

View File

@@ -175,9 +175,10 @@ class TLGenerator:
builder.writeln('class {}(TLObject):'.format(tlobject.class_name()))
# Class-level variable to store its Telegram's constructor ID
builder.writeln('constructor_id = {}'.format(hex(tlobject.id)))
builder.writeln('subclass_of_id = {}'.format(
hex(crc32(tlobject.result.encode('ascii')))))
builder.writeln('CONSTRUCTOR_ID = {}'.format(hex(tlobject.id)))
builder.writeln('SUBCLASS_OF_ID = {}'.format(
hex(crc32(tlobject.result.encode('ascii'))))
)
builder.writeln()
# Flag arguments must go last