projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update auto-updated Java files
[ldk-java]
/
src
/
main
/
java
/
org
/
ldk
/
structs
/
Init.java
diff --git
a/src/main/java/org/ldk/structs/Init.java
b/src/main/java/org/ldk/structs/Init.java
index 78b0c502fb43afa4dc0ac8a63fc171f36814c916..fd91adc0b9a19823c8bdab978b6b469d8f2c744f 100644
(file)
--- a/
src/main/java/org/ldk/structs/Init.java
+++ b/
src/main/java/org/ldk/structs/Init.java
@@
-4,6
+4,8
@@
import org.ldk.impl.bindings;
import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import java.lang.ref.Reference;
+import javax.annotation.Nullable;
/**
/**
@@
-23,7
+25,9
@@
public class Init extends CommonBase {
*/
public InitFeatures get_features() {
long ret = bindings.Init_get_features(this.ptr);
*/
public InitFeatures get_features() {
long ret = bindings.Init_get_features(this.ptr);
- InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InitFeatures(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
@@
-33,26
+37,36
@@
public class Init extends CommonBase {
*/
public void set_features(InitFeatures val) {
bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
*/
public void set_features(InitFeatures val) {
bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
- this.ptrs_to.add(val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
* Constructs a new Init given each field
*/
}
/**
* Constructs a new Init given each field
*/
- public static Init
constructor_new
(InitFeatures features_arg) {
+ public static Init
of
(InitFeatures features_arg) {
long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
- Init ret_hu_conv = new Init(null, ret);
+ Reference.reachabilityFence(features_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Init(null, ret); }
ret_hu_conv.ptrs_to.add(ret_hu_conv);
ret_hu_conv.ptrs_to.add(ret_hu_conv);
- ret_hu_conv.ptrs_to.add(features_arg);
return ret_hu_conv;
}
return ret_hu_conv;
}
+ long clone_ptr() {
+ long ret = bindings.Init_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
/**
* Creates a copy of the Init
*/
public Init clone() {
long ret = bindings.Init_clone(this.ptr);
/**
* Creates a copy of the Init
*/
public Init clone() {
long ret = bindings.Init_clone(this.ptr);
- Init ret_hu_conv = new Init(null, ret);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Init(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
@@
-62,14
+76,17
@@
public class Init extends CommonBase {
*/
public byte[] write() {
byte[] ret = bindings.Init_write(this.ptr);
*/
public byte[] write() {
byte[] ret = bindings.Init_write(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
/**
* Read a Init from a byte array, created by Init_write
*/
return ret;
}
/**
* Read a Init from a byte array, created by Init_write
*/
- public static Result_InitDecodeErrorZ
constructor_
read(byte[] ser) {
+ public static Result_InitDecodeErrorZ read(byte[] ser) {
long ret = bindings.Init_read(ser);
long ret = bindings.Init_read(ser);
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}