X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FResult_ScoringParametersDecodeErrorZ.java;h=2b4d58dd28f8011beabd0eadd0691a4b488bee50;hp=6b99a12d09694a127192c1394192f688dd85d7f3;hb=6fe917116a65d7b62123226c4240d77ea2719783;hpb=1f873e8aeb7a8395a7a99d244fba7474a0543278 diff --git a/src/main/java/org/ldk/structs/Result_ScoringParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ScoringParametersDecodeErrorZ.java index 6b99a12d..2b4d58dd 100644 --- a/src/main/java/org/ldk/structs/Result_ScoringParametersDecodeErrorZ.java +++ b/src/main/java/org/ldk/structs/Result_ScoringParametersDecodeErrorZ.java @@ -45,13 +45,9 @@ public class Result_ScoringParametersDecodeErrorZ extends CommonBase { /** * Creates a new CResult_ScoringParametersDecodeErrorZ in the success state. */ - public static Result_ScoringParametersDecodeErrorZ ok(long o_base_penalty_msat_arg, long o_failure_penalty_msat_arg, short o_overuse_penalty_start_1024th_arg, long o_overuse_penalty_msat_per_1024th_arg, long o_failure_penalty_half_life_arg) { - long ret = bindings.CResult_ScoringParametersDecodeErrorZ_ok(bindings.ScoringParameters_new(o_base_penalty_msat_arg, o_failure_penalty_msat_arg, o_overuse_penalty_start_1024th_arg, o_overuse_penalty_msat_per_1024th_arg, o_failure_penalty_half_life_arg)); - Reference.reachabilityFence(o_base_penalty_msat_arg); - Reference.reachabilityFence(o_failure_penalty_msat_arg); - Reference.reachabilityFence(o_overuse_penalty_start_1024th_arg); - Reference.reachabilityFence(o_overuse_penalty_msat_per_1024th_arg); - Reference.reachabilityFence(o_failure_penalty_half_life_arg); + public static Result_ScoringParametersDecodeErrorZ ok(ScoringParameters o) { + long ret = bindings.CResult_ScoringParametersDecodeErrorZ_ok(o == null ? 0 : o.ptr & ~1); + Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } Result_ScoringParametersDecodeErrorZ ret_hu_conv = Result_ScoringParametersDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; @@ -77,4 +73,22 @@ public class Result_ScoringParametersDecodeErrorZ extends CommonBase { return ret; } + long clone_ptr() { + long ret = bindings.CResult_ScoringParametersDecodeErrorZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + /** + * Creates a new CResult_ScoringParametersDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public Result_ScoringParametersDecodeErrorZ clone() { + long ret = bindings.CResult_ScoringParametersDecodeErrorZ_clone(this.ptr); + Reference.reachabilityFence(this); + if (ret >= 0 && ret <= 4096) { return null; } + Result_ScoringParametersDecodeErrorZ ret_hu_conv = Result_ScoringParametersDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + }