Skip to content

Commit ab07d43

Browse files
committed
[TS + C#] Correct indentation in enum variant-fetching C code
1 parent 2f8218e commit ab07d43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

csharp_strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def map_complex_enum(self, struct_name, variant_list, camel_to_snake, enum_doc_c
10331033
out_c += "\t" + struct_name + " *obj = (" + struct_name + "*)untag_ptr(ptr);\n"
10341034
out_c += f"\tassert(obj->tag == {struct_name}_{var.var_name});\n"
10351035
if field_map.ret_conv is not None:
1036-
out_c += ("\t\t\t" + field_map.ret_conv[0].replace("\n", "\n\t\t\t"))
1036+
out_c += ("\t" + field_map.ret_conv[0].replace("\n", "\n\t"))
10371037
if var.tuple_variant:
10381038
out_c += "obj->" + camel_to_snake(var.var_name)
10391039
else:

typescript_strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ def map_complex_enum(self, struct_name, variant_list, camel_to_snake, enum_doc_c
13651365
out_c += "\t" + struct_name + " *obj = (" + struct_name + "*)untag_ptr(ptr);\n"
13661366
out_c += f"\tassert(obj->tag == {struct_name}_{var.var_name});\n"
13671367
if field_map.ret_conv is not None:
1368-
out_c += ("\t\t\t" + field_map.ret_conv[0].replace("\n", "\n\t\t\t"))
1368+
out_c += ("\t" + field_map.ret_conv[0].replace("\n", "\n\t"))
13691369
if var.tuple_variant:
13701370
out_c += "obj->" + camel_to_snake(var.var_name)
13711371
else:

0 commit comments

Comments
 (0)