projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Java] Properly convert strings to/from Modified UTF-8
[ldk-java]
/
src
/
main
/
java
/
org
/
ldk
/
structs
/
TwoTuple_PaymentHashPaymentSecretZ.java
diff --git
a/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java
b/src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java
index 0ba6ac805f5ee6efdb4935f4e2dd33278541ba0c..8becf4c66a999bbab8acc972554f36ca0aa57e89 100644
(file)
--- a/
src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.java
+++ b/
src/main/java/org/ldk/structs/TwoTuple_PaymentHashPaymentSecretZ.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,6
+25,7
@@
public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
*/
public byte[] get_a() {
byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
*/
public byte[] get_a() {
byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-32,6
+34,13
@@
public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
*/
public byte[] get_b() {
byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
*/
public byte[] get_b() {
byte[] ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ long clone_ptr() {
+ long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-41,9
+50,10
@@
public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
*/
public TwoTuple_PaymentHashPaymentSecretZ clone() {
long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
*/
public TwoTuple_PaymentHashPaymentSecretZ clone() {
long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
-
ret_hu_conv.ptrs_to.add(this)
;
+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }
;
return ret_hu_conv;
}
return ret_hu_conv;
}
@@
-51,10
+61,12
@@
public class TwoTuple_PaymentHashPaymentSecretZ extends CommonBase {
* Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
*/
public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
* Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements.
*/
public static TwoTuple_PaymentHashPaymentSecretZ of(byte[] a, byte[] b) {
- long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(a, b);
+ long ret = bindings.C2Tuple_PaymentHashPaymentSecretZ_new(InternalUtils.check_arr_len(a, 32), InternalUtils.check_arr_len(b, 32));
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_PaymentHashPaymentSecretZ ret_hu_conv = new TwoTuple_PaymentHashPaymentSecretZ(null, ret);
-
ret_hu_conv.ptrs_to.add(ret_hu_conv)
;
+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); }
;
return ret_hu_conv;
}
return ret_hu_conv;
}