From: Matt Corallo Date: Mon, 16 Oct 2023 02:46:09 +0000 (+0000) Subject: [TS + C#] Correct indentation in enum variant-fetching C code X-Git-Tag: v0.0.118.0^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ab07d4394be144b5e7eb123655031dba5349b849;p=ldk-java [TS + C#] Correct indentation in enum variant-fetching C code --- 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: