]> git.bitcoin.ninja Git - ldk-java/commitdiff
[TS + C#] Correct indentation in enum variant-fetching C code
authorMatt Corallo <git@bluematt.me>
Mon, 16 Oct 2023 02:46:09 +0000 (02:46 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 16 Oct 2023 02:46:09 +0000 (02:46 +0000)
csharp_strings.py
typescript_strings.py

index 0e5332233d784c050ef172ea5f1ef353e41a05f7..4df1d34c688fb5d4b1d976cbbcfc75b64546446c 100644 (file)
@@ -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:
index 1f050bada4e7ed0bbd802d0449bd4757e4e0e021..e691f45845142e9e61e1999e4c87ae0281838478 100644 (file)
@@ -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: