From ab07d4394be144b5e7eb123655031dba5349b849 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 16 Oct 2023 02:46:09 +0000 Subject: [PATCH] [TS + C#] Correct indentation in enum variant-fetching C code --- csharp_strings.py | 2 +- typescript_strings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/csharp_strings.py b/csharp_strings.py index 0e533223..4df1d34c 100644 --- a/csharp_strings.py +++ b/csharp_strings.py @@ -1033,7 +1033,7 @@ namespace org { namespace ldk { namespace structs { out_c += "\t" + struct_name + " *obj = (" + struct_name + "*)untag_ptr(ptr);\n" out_c += f"\tassert(obj->tag == {struct_name}_{var.var_name});\n" if field_map.ret_conv is not None: - out_c += ("\t\t\t" + field_map.ret_conv[0].replace("\n", "\n\t\t\t")) + out_c += ("\t" + field_map.ret_conv[0].replace("\n", "\n\t")) if var.tuple_variant: out_c += "obj->" + camel_to_snake(var.var_name) else: diff --git a/typescript_strings.py b/typescript_strings.py index 1f050bad..e691f458 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -1365,7 +1365,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{ out_c += "\t" + struct_name + " *obj = (" + struct_name + "*)untag_ptr(ptr);\n" out_c += f"\tassert(obj->tag == {struct_name}_{var.var_name});\n" if field_map.ret_conv is not None: - out_c += ("\t\t\t" + field_map.ret_conv[0].replace("\n", "\n\t\t\t")) + out_c += ("\t" + field_map.ret_conv[0].replace("\n", "\n\t")) if var.tuple_variant: out_c += "obj->" + camel_to_snake(var.var_name) else: -- 2.39.5