Skip to content

Commit 60488b8

Browse files
authored
Merge f325605 into 7bd251f
2 parents 7bd251f + f325605 commit 60488b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ydb/library/yql/parser/proto_ast/gen/multiproto.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def main(argv):
4848
out_file.write(line)
4949
for line in in_file:
5050
line=line.replace("inline ","")
51+
if 'Generated::' in line and line.endswith('_default_instance_._instance,\n'):
52+
line = f'reinterpret_cast<const ::_pb::Message*>({line.removesuffix('._instance,\n')}),'
5153
if line.startswith("#"):
5254
out_file.write(line)
5355
continue
@@ -66,7 +68,8 @@ def main(argv):
6668
in_class_def=False
6769
continue
6870
if line.startswith("PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT"):
69-
type_name=line.split(" ")[2]
71+
# MOD1 MOD2 MOD3 ... type_name varibale_name;
72+
type_name=line.split(" ")[-2]
7073
if type_name in current_types:
7174
out_file.write(line)
7275
continue

0 commit comments

Comments
 (0)