projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use LC_ALL instead of LANG to correct zip file ordering
[ldk-java]
/
src
/
main
/
java
/
org
/
ldk
/
structs
/
UnsignedNodeAnnouncement.java
diff --git
a/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
b/src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
index 1014dbee349f543071621dd09a1dab9f5aa8996d..7c6c614e8c10f52b99c3ccae021bf3323acfb0a9 100644
(file)
--- a/
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
+++ b/
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
@@
-4,6
+4,7
@@
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;
import javax.annotation.Nullable;
@@
-24,8
+25,9
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public NodeFeatures get_features() {
long ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
*/
public NodeFeatures get_features() {
long ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
- if (ret < 1024) { return null; }
- NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ NodeFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new NodeFeatures(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
@@
-35,6
+37,8
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public void set_features(NodeFeatures val) {
bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
*/
public void set_features(NodeFeatures val) {
bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
}
/**
@@
-42,6
+46,7
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public int get_timestamp() {
int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this.ptr);
*/
public int get_timestamp() {
int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-50,6
+55,8
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public void set_timestamp(int val) {
bindings.UnsignedNodeAnnouncement_set_timestamp(this.ptr, val);
*/
public void set_timestamp(int val) {
bindings.UnsignedNodeAnnouncement_set_timestamp(this.ptr, val);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
}
/**
@@
-58,6
+65,7
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public byte[] get_node_id() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this.ptr);
*/
public byte[] get_node_id() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-66,7
+74,9
@@
public class UnsignedNodeAnnouncement extends CommonBase {
* to this node).
*/
public void set_node_id(byte[] val) {
* to this node).
*/
public void set_node_id(byte[] val) {
- bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, val);
+ bindings.UnsignedNodeAnnouncement_set_node_id(this.ptr, InternalUtils.check_arr_len(val, 33));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
}
/**
@@
-74,6
+84,7
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public byte[] get_rgb() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this.ptr);
*/
public byte[] get_rgb() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-81,7
+92,9
@@
public class UnsignedNodeAnnouncement extends CommonBase {
* An RGB color for UI purposes
*/
public void set_rgb(byte[] val) {
* An RGB color for UI purposes
*/
public void set_rgb(byte[] val) {
- bindings.UnsignedNodeAnnouncement_set_rgb(this.ptr, val);
+ bindings.UnsignedNodeAnnouncement_set_rgb(this.ptr, InternalUtils.check_arr_len(val, 3));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
}
/**
@@
-90,6
+103,7
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public byte[] get_alias() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this.ptr);
*/
public byte[] get_alias() {
byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-98,7
+112,9
@@
public class UnsignedNodeAnnouncement extends CommonBase {
* of uniqueness.
*/
public void set_alias(byte[] val) {
* of uniqueness.
*/
public void set_alias(byte[] val) {
- bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, val);
+ bindings.UnsignedNodeAnnouncement_set_alias(this.ptr, InternalUtils.check_arr_len(val, 32));
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
}
/**
}
/**
@@
-106,6
+122,14
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public void set_addresses(NetAddress[] val) {
bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
*/
public void set_addresses(NetAddress[] val) {
bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, val != null ? Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray() : null);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(val);
+ }
+
+ long clone_ptr() {
+ long ret = bindings.UnsignedNodeAnnouncement_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
}
/**
}
/**
@@
-113,8
+137,9
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public UnsignedNodeAnnouncement clone() {
long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
*/
public UnsignedNodeAnnouncement clone() {
long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
- if (ret < 1024) { return null; }
- UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret);
+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ UnsignedNodeAnnouncement ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UnsignedNodeAnnouncement(null, ret); }
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
ret_hu_conv.ptrs_to.add(this);
return ret_hu_conv;
}
@@
-124,6
+149,7
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public byte[] write() {
byte[] ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
*/
public byte[] write() {
byte[] ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-132,7
+158,8
@@
public class UnsignedNodeAnnouncement extends CommonBase {
*/
public static Result_UnsignedNodeAnnouncementDecodeErrorZ read(byte[] ser) {
long ret = bindings.UnsignedNodeAnnouncement_read(ser);
*/
public static Result_UnsignedNodeAnnouncementDecodeErrorZ read(byte[] ser) {
long ret = bindings.UnsignedNodeAnnouncement_read(ser);
- if (ret < 1024) { return null; }
+ Reference.reachabilityFence(ser);
+ if (ret >= 0 && ret <= 4096) { return null; }
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}
Result_UnsignedNodeAnnouncementDecodeErrorZ ret_hu_conv = Result_UnsignedNodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
return ret_hu_conv;
}