X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FDecodeError.java;h=64206c55438800bff30c1338a40e5f64febecda7;hb=f3e670e9341decac613d33fc52febf19cea32f20;hp=198e61d1234569383d5318686899820fe2d82b98;hpb=db1a11032b4164540a2d3403696be12bbca70e94;p=ldk-java diff --git a/src/main/java/org/ldk/structs/DecodeError.java b/src/main/java/org/ldk/structs/DecodeError.java index 198e61d1..64206c55 100644 --- a/src/main/java/org/ldk/structs/DecodeError.java +++ b/src/main/java/org/ldk/structs/DecodeError.java @@ -19,13 +19,18 @@ public class DecodeError extends CommonBase { if (ptr != 0) { bindings.DecodeError_free(ptr); } } + long clone_ptr() { + long ret = bindings.DecodeError_clone_ptr(this.ptr); + return ret; + } + /** * Creates a copy of the DecodeError */ public DecodeError clone() { long ret = bindings.DecodeError_clone(this.ptr); - if (ret < 1024) { return null; } - DecodeError ret_hu_conv = new DecodeError(null, ret); + if (ret >= 0 && ret <= 4096) { return null; } + DecodeError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new DecodeError(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; }