X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FPaymentError.java;h=32b3ebc38ded052ba43be04947e3cd78b141e2ac;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=7f1d4935f8b6d41898060ac2b286725735a0ee86;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/PaymentError.java b/src/main/java/org/ldk/structs/PaymentError.java index 7f1d4935..32b3ebc3 100644 --- a/src/main/java/org/ldk/structs/PaymentError.java +++ b/src/main/java/org/ldk/structs/PaymentError.java @@ -4,6 +4,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; @@ -70,6 +71,7 @@ public class PaymentError extends CommonBase { } long clone_ptr() { long ret = bindings.PaymentError_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -78,6 +80,7 @@ public class PaymentError extends CommonBase { */ public PaymentError clone() { long ret = bindings.PaymentError_clone(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } PaymentError ret_hu_conv = PaymentError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); @@ -89,6 +92,7 @@ public class PaymentError extends CommonBase { */ public static PaymentError invoice(java.lang.String a) { long ret = bindings.PaymentError_invoice(a); + Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } PaymentError ret_hu_conv = PaymentError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); @@ -100,6 +104,7 @@ public class PaymentError extends CommonBase { */ public static PaymentError routing(LightningError a) { long ret = bindings.PaymentError_routing(a == null ? 0 : a.ptr & ~1); + Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } PaymentError ret_hu_conv = PaymentError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); @@ -111,6 +116,7 @@ public class PaymentError extends CommonBase { */ public static PaymentError sending(PaymentSendFailure a) { long ret = bindings.PaymentError_sending(a.ptr); + Reference.reachabilityFence(a); if (ret >= 0 && ret <= 4096) { return null; } PaymentError ret_hu_conv = PaymentError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv);