Fix patched objects missing CONSTRUCTOR_ID/SUBCLASS_OF_ID

This commit is contained in:
Lonami Exo 2018-09-17 16:02:45 +02:00
parent db8bea3968
commit 497c2144f2

View File

@ -648,6 +648,10 @@ def _write_patched(out_dir, namespace_tlobjects):
builder.writeln('class {}(custom.{}):', t.class_name,
PATCHED_TYPES[t.fullname])
builder.writeln('CONSTRUCTOR_ID = {:#x}', t.id)
builder.writeln('SUBCLASS_OF_ID = {:#x}',
crc32(t.result.encode('ascii')))
_write_to_dict(t, builder)
_write_to_bytes(t, builder)
_write_from_reader(t, builder)