X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FOption_CVec_NetAddressZZ.java;h=66907b320091cb28026c164cab5adb7ac40b3aef;hb=ff3dacec3be60f870d81f6df11bd9fff92aa6047;hp=a3e77a308d68b6d43e38c2bc99df4ce87bc95ea1;hpb=6d094e745feaf94c1059555cd1c997965a34bc36;p=ldk-java diff --git a/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java b/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java index a3e77a30..66907b32 100644 --- a/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.java +++ b/src/main/java/org/ldk/structs/Option_CVec_NetAddressZZ.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; @@ -37,10 +38,11 @@ public class Option_CVec_NetAddressZZ extends CommonBase { private Some(long ptr, bindings.LDKCOption_CVec_NetAddressZZ.Some obj) { super(null, ptr); long[] some = obj.some; - NetAddress[] some_conv_12_arr = new NetAddress[some.length]; - for (int m = 0; m < some.length; m++) { + int some_conv_12_len = some.length; + NetAddress[] some_conv_12_arr = new NetAddress[some_conv_12_len]; + for (int m = 0; m < some_conv_12_len; m++) { long some_conv_12 = some[m]; - NetAddress some_conv_12_hu_conv = NetAddress.constr_from_ptr(some_conv_12); + org.ldk.structs.NetAddress some_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(some_conv_12); some_conv_12_hu_conv.ptrs_to.add(this); some_conv_12_arr[m] = some_conv_12_hu_conv; } @@ -60,8 +62,9 @@ public class Option_CVec_NetAddressZZ extends CommonBase { */ public static Option_CVec_NetAddressZZ some(NetAddress[] o) { long ret = bindings.COption_CVec_NetAddressZZ_some(o != null ? Arrays.stream(o).mapToLong(o_conv_12 -> o_conv_12.ptr).toArray() : null); + Reference.reachabilityFence(o); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -72,13 +75,14 @@ public class Option_CVec_NetAddressZZ extends CommonBase { public static Option_CVec_NetAddressZZ none() { long ret = bindings.COption_CVec_NetAddressZZ_none(); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } long clone_ptr() { long ret = bindings.COption_CVec_NetAddressZZ_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -88,8 +92,9 @@ public class Option_CVec_NetAddressZZ extends CommonBase { */ public Option_CVec_NetAddressZZ clone() { long ret = bindings.COption_CVec_NetAddressZZ_clone(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret); + org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; }