[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / Sha256.java
index 4112c44f0b4ae49774bd874d4b6cf352ffbd5697..6daa4ecd23c7c2b2596373719d5fdab9613f5e58 100644 (file)
@@ -34,7 +34,7 @@ public class Sha256 extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Sha256 ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Sha256(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;
        }
 
@@ -56,10 +56,10 @@ public class Sha256 extends CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public boolean eq(Sha256 b) {
-               boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
+               boolean ret = bindings.Sha256_eq(this.ptr, b == null ? 0 : b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
-               this.ptrs_to.add(b);
+               if (this != null) { this.ptrs_to.add(b); };
                return ret;
        }