]> git.bitcoin.ninja Git - ldk-java/commitdiff
Update to support None
authorMatt Corallo <git@bluematt.me>
Tue, 13 Oct 2020 19:06:44 +0000 (15:06 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Oct 2020 19:06:44 +0000 (15:06 -0400)
67 files changed:
genbindings.py
src/main/java/org/ldk/structs/AcceptChannel.java
src/main/java/org/ldk/structs/AnnouncementSignatures.java
src/main/java/org/ldk/structs/ChainMonitor.java
src/main/java/org/ldk/structs/ChannelAnnouncement.java
src/main/java/org/ldk/structs/ChannelConfig.java
src/main/java/org/ldk/structs/ChannelDetails.java
src/main/java/org/ldk/structs/ChannelHandshakeConfig.java
src/main/java/org/ldk/structs/ChannelHandshakeLimits.java
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/ChannelKeys.java
src/main/java/org/ldk/structs/ChannelManager.java
src/main/java/org/ldk/structs/ChannelManagerReadArgs.java
src/main/java/org/ldk/structs/ChannelMessageHandler.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
src/main/java/org/ldk/structs/ChannelPublicKeys.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ChannelUpdate.java
src/main/java/org/ldk/structs/ClosingSigned.java
src/main/java/org/ldk/structs/CommitmentSigned.java
src/main/java/org/ldk/structs/CommitmentUpdate.java
src/main/java/org/ldk/structs/DataLossProtect.java
src/main/java/org/ldk/structs/DirectionalChannelInfo.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/Filter.java
src/main/java/org/ldk/structs/FundingCreated.java
src/main/java/org/ldk/structs/FundingLocked.java
src/main/java/org/ldk/structs/FundingSigned.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/HTLCUpdate.java
src/main/java/org/ldk/structs/HolderCommitmentTransaction.java
src/main/java/org/ldk/structs/InMemoryChannelKeys.java
src/main/java/org/ldk/structs/Init.java
src/main/java/org/ldk/structs/MessageHandler.java
src/main/java/org/ldk/structs/NetGraphMsgHandler.java
src/main/java/org/ldk/structs/NodeAnnouncement.java
src/main/java/org/ldk/structs/NodeAnnouncementInfo.java
src/main/java/org/ldk/structs/NodeInfo.java
src/main/java/org/ldk/structs/OpenChannel.java
src/main/java/org/ldk/structs/OutPoint.java
src/main/java/org/ldk/structs/PeerHandleError.java
src/main/java/org/ldk/structs/PeerManager.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/PreCalculatedTxCreationKeys.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/ReplyChannelRange.java
src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java
src/main/java/org/ldk/structs/RevokeAndACK.java
src/main/java/org/ldk/structs/Route.java
src/main/java/org/ldk/structs/RouteHint.java
src/main/java/org/ldk/structs/RouteHop.java
src/main/java/org/ldk/structs/RoutingFees.java
src/main/java/org/ldk/structs/Shutdown.java
src/main/java/org/ldk/structs/TxCreationKeys.java
src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java
src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
src/main/java/org/ldk/structs/UpdateAddHTLC.java
src/main/java/org/ldk/structs/UpdateFailHTLC.java
src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java
src/main/java/org/ldk/structs/UpdateFee.java
src/main/java/org/ldk/structs/UpdateFulfillHTLC.java
src/main/java/org/ldk/structs/UserConfig.java

index 7382cdccd08dde633a4fb8136249a5162ebb6f56..d2cf50db00938836c97e5964ada92e317446e484 100755 (executable)
@@ -498,9 +498,9 @@ with open(sys.argv[1]) as in_h, open(sys.argv[2], "w") as out_java, open(sys.arg
                 if info.arg_name == "this_arg":
                     out_java_struct.write("this.ptr")
                 elif info.passed_as_ptr and info.rust_obj in opaque_structs:
-                    out_java_struct.write(info.arg_name + ".ptr & ~1")
+                    out_java_struct.write(info.arg_name + " == null ? 0 : " + info.arg_name + ".ptr & ~1")
                 elif info.passed_as_ptr and info.rust_obj in trait_structs:
-                    out_java_struct.write(info.arg_name + ".ptr")
+                    out_java_struct.write(info.arg_name + " == null ? 0 : " + info.arg_name + ".ptr")
                 else:
                     out_java_struct.write(info.arg_name)
             out_java_struct.write(")")
index e781f87da659af429959a06cbdf0d1416747ca40..e7c4b472dd3f104b919cd5ce7a50e4e324228bf8 100644 (file)
@@ -11,161 +11,161 @@ public class AcceptChannel extends CommonBase {
        }
 
        public AcceptChannel(AcceptChannel orig) {
-               super(bindings.AcceptChannel_clone(orig.ptr & ~1));
+               super(bindings.AcceptChannel_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_temporary_channel_id(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_temporary_channel_id(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_temporary_channel_id(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_dust_limit_satoshis(AcceptChannel this_ptr) {
-               long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.AcceptChannel_get_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_dust_limit_satoshis(AcceptChannel this_ptr, long val) {
-               bindings.AcceptChannel_set_dust_limit_satoshis(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_max_htlc_value_in_flight_msat(AcceptChannel this_ptr) {
-               long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1);
+               long ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_htlc_value_in_flight_msat(AcceptChannel this_ptr, long val) {
-               bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_channel_reserve_satoshis(AcceptChannel this_ptr) {
-               long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_reserve_satoshis(AcceptChannel this_ptr, long val) {
-               bindings.AcceptChannel_set_channel_reserve_satoshis(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_minimum_msat(AcceptChannel this_ptr) {
-               long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.AcceptChannel_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_minimum_msat(AcceptChannel this_ptr, long val) {
-               bindings.AcceptChannel_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_minimum_depth(AcceptChannel this_ptr) {
-               int ret = bindings.AcceptChannel_get_minimum_depth(this_ptr.ptr & ~1);
+               int ret = bindings.AcceptChannel_get_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_minimum_depth(AcceptChannel this_ptr, int val) {
-               bindings.AcceptChannel_set_minimum_depth(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_to_self_delay(AcceptChannel this_ptr) {
-               short ret = bindings.AcceptChannel_get_to_self_delay(this_ptr.ptr & ~1);
+               short ret = bindings.AcceptChannel_get_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_to_self_delay(AcceptChannel this_ptr, short val) {
-               bindings.AcceptChannel_set_to_self_delay(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_max_accepted_htlcs(AcceptChannel this_ptr) {
-               short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this_ptr.ptr & ~1);
+               short ret = bindings.AcceptChannel_get_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_accepted_htlcs(AcceptChannel this_ptr, short val) {
-               bindings.AcceptChannel_set_max_accepted_htlcs(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_funding_pubkey(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_pubkey(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_funding_pubkey(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_revocation_basepoint(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_revocation_basepoint(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_revocation_basepoint(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_point(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_payment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_point(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_payment_point(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_delayed_payment_basepoint(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_delayed_payment_basepoint(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_delayed_payment_basepoint(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_htlc_basepoint(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_basepoint(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_htlc_basepoint(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_first_per_commitment_point(AcceptChannel this_ptr) {
-               byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AcceptChannel_get_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_per_commitment_point(AcceptChannel this_ptr, byte[] val) {
-               bindings.AcceptChannel_set_first_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.AcceptChannel_set_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index dfc143f9fdefed2b7a8ad8f475fbd3b37a141693..b481274685754d1c0bc1d2c8a685ad24b95c5016 100644 (file)
@@ -11,51 +11,51 @@ public class AnnouncementSignatures extends CommonBase {
        }
 
        public AnnouncementSignatures(AnnouncementSignatures orig) {
-               super(bindings.AnnouncementSignatures_clone(orig.ptr & ~1));
+               super(bindings.AnnouncementSignatures_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(AnnouncementSignatures this_ptr) {
-               byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(AnnouncementSignatures this_ptr, byte[] val) {
-               bindings.AnnouncementSignatures_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.AnnouncementSignatures_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_short_channel_id(AnnouncementSignatures this_ptr) {
-               long ret = bindings.AnnouncementSignatures_get_short_channel_id(this_ptr.ptr & ~1);
+               long ret = bindings.AnnouncementSignatures_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_short_channel_id(AnnouncementSignatures this_ptr, long val) {
-               bindings.AnnouncementSignatures_set_short_channel_id(this_ptr.ptr & ~1, val);
+               bindings.AnnouncementSignatures_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_node_signature(AnnouncementSignatures this_ptr) {
-               byte[] ret = bindings.AnnouncementSignatures_get_node_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AnnouncementSignatures_get_node_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_signature(AnnouncementSignatures this_ptr, byte[] val) {
-               bindings.AnnouncementSignatures_set_node_signature(this_ptr.ptr & ~1, val);
+               bindings.AnnouncementSignatures_set_node_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_bitcoin_signature(AnnouncementSignatures this_ptr) {
-               byte[] ret = bindings.AnnouncementSignatures_get_bitcoin_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.AnnouncementSignatures_get_bitcoin_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_bitcoin_signature(AnnouncementSignatures this_ptr, byte[] val) {
-               bindings.AnnouncementSignatures_set_bitcoin_signature(this_ptr.ptr & ~1, val);
+               bindings.AnnouncementSignatures_set_bitcoin_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 24ed59fdee1ff759e3433b76fe87c1da8f68647b..55a934a2ee698614e0cfeb301f8be5fc8c13c85c 100644 (file)
@@ -16,7 +16,7 @@ public class ChainMonitor extends CommonBase {
        }
 
        public ChainMonitor(Filter chain_source, BroadcasterInterface broadcaster, Logger logger, FeeEstimator feeest) {
-               super(bindings.ChainMonitor_new(chain_source.ptr, broadcaster.ptr, logger.ptr, feeest.ptr));
+               super(bindings.ChainMonitor_new(chain_source == null ? 0 : chain_source.ptr, broadcaster == null ? 0 : broadcaster.ptr, logger == null ? 0 : logger.ptr, feeest == null ? 0 : feeest.ptr));
                this.ptrs_to.add(chain_source);
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(logger);
index 1c68067027638131088139e2294cf94e51dc2b98..69c573d8af3a2675de81fb8408526c8483f7962e 100644 (file)
@@ -11,68 +11,68 @@ public class ChannelAnnouncement extends CommonBase {
        }
 
        public ChannelAnnouncement(ChannelAnnouncement orig) {
-               super(bindings.ChannelAnnouncement_clone(orig.ptr & ~1));
+               super(bindings.ChannelAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_node_signature_1(ChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_signature_1(ChannelAnnouncement this_ptr, byte[] val) {
-               bindings.ChannelAnnouncement_set_node_signature_1(this_ptr.ptr & ~1, val);
+               bindings.ChannelAnnouncement_set_node_signature_1(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_node_signature_2(ChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.ChannelAnnouncement_get_node_signature_2(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelAnnouncement_get_node_signature_2(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_signature_2(ChannelAnnouncement this_ptr, byte[] val) {
-               bindings.ChannelAnnouncement_set_node_signature_2(this_ptr.ptr & ~1, val);
+               bindings.ChannelAnnouncement_set_node_signature_2(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_bitcoin_signature_1(ChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_bitcoin_signature_1(ChannelAnnouncement this_ptr, byte[] val) {
-               bindings.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr.ptr & ~1, val);
+               bindings.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_bitcoin_signature_2(ChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_bitcoin_signature_2(ChannelAnnouncement this_ptr, byte[] val) {
-               bindings.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr.ptr & ~1, val);
+               bindings.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public UnsignedChannelAnnouncement get_contents(ChannelAnnouncement this_ptr) {
-               UnsignedChannelAnnouncement ret = new UnsignedChannelAnnouncement(null, bindings.ChannelAnnouncement_get_contents(this_ptr.ptr & ~1));
+               UnsignedChannelAnnouncement ret = new UnsignedChannelAnnouncement(null, bindings.ChannelAnnouncement_get_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_contents(ChannelAnnouncement this_ptr, UnsignedChannelAnnouncement val) {
-               bindings.ChannelAnnouncement_set_contents(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelAnnouncement_set_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelAnnouncement(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, UnsignedChannelAnnouncement contents_arg) {
-               super(bindings.ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg.ptr & ~1));
+               super(bindings.ChannelAnnouncement_new(node_signature_1_arg, node_signature_2_arg, bitcoin_signature_1_arg, bitcoin_signature_2_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1));
                this.ptrs_to.add(contents_arg);
        }
 
index ba24fc377e51fb501f73b4c7e90ebda98bf9f2a6..7676cae3051952892f79503781f7c101a6818565 100644 (file)
@@ -11,40 +11,40 @@ public class ChannelConfig extends CommonBase {
        }
 
        public ChannelConfig(ChannelConfig orig) {
-               super(bindings.ChannelConfig_clone(orig.ptr & ~1));
+               super(bindings.ChannelConfig_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public int get_fee_proportional_millionths(ChannelConfig this_ptr) {
-               int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this_ptr.ptr & ~1);
+               int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_proportional_millionths(ChannelConfig this_ptr, int val) {
-               bindings.ChannelConfig_set_fee_proportional_millionths(this_ptr.ptr & ~1, val);
+               bindings.ChannelConfig_set_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_announced_channel(ChannelConfig this_ptr) {
-               boolean ret = bindings.ChannelConfig_get_announced_channel(this_ptr.ptr & ~1);
+               boolean ret = bindings.ChannelConfig_get_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_announced_channel(ChannelConfig this_ptr, boolean val) {
-               bindings.ChannelConfig_set_announced_channel(this_ptr.ptr & ~1, val);
+               bindings.ChannelConfig_set_announced_channel(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr) {
-               boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr.ptr & ~1);
+               boolean ret = bindings.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_commit_upfront_shutdown_pubkey(ChannelConfig this_ptr, boolean val) {
-               bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr.ptr & ~1, val);
+               bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 93bb22a71a4de6644510cee55a005ebf08004d39..740cb20c1a4f6f0cefe84c04b7575381166affda 100644 (file)
@@ -11,96 +11,96 @@ public class ChannelDetails extends CommonBase {
        }
 
        public ChannelDetails(ChannelDetails orig) {
-               super(bindings.ChannelDetails_clone(orig.ptr & ~1));
+               super(bindings.ChannelDetails_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(ChannelDetails this_ptr) {
-               byte[] ret = bindings.ChannelDetails_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelDetails_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(ChannelDetails this_ptr, byte[] val) {
-               bindings.ChannelDetails_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_remote_network_id(ChannelDetails this_ptr) {
-               byte[] ret = bindings.ChannelDetails_get_remote_network_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelDetails_get_remote_network_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_remote_network_id(ChannelDetails this_ptr, byte[] val) {
-               bindings.ChannelDetails_set_remote_network_id(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_remote_network_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public InitFeatures get_counterparty_features(ChannelDetails this_ptr) {
-               InitFeatures ret = new InitFeatures(null, bindings.ChannelDetails_get_counterparty_features(this_ptr.ptr & ~1));
+               InitFeatures ret = new InitFeatures(null, bindings.ChannelDetails_get_counterparty_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_counterparty_features(ChannelDetails this_ptr, InitFeatures val) {
-               bindings.ChannelDetails_set_counterparty_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelDetails_set_counterparty_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public long get_channel_value_satoshis(ChannelDetails this_ptr) {
-               long ret = bindings.ChannelDetails_get_channel_value_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelDetails_get_channel_value_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_value_satoshis(ChannelDetails this_ptr, long val) {
-               bindings.ChannelDetails_set_channel_value_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_channel_value_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_user_id(ChannelDetails this_ptr) {
-               long ret = bindings.ChannelDetails_get_user_id(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelDetails_get_user_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_user_id(ChannelDetails this_ptr, long val) {
-               bindings.ChannelDetails_set_user_id(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_user_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_outbound_capacity_msat(ChannelDetails this_ptr) {
-               long ret = bindings.ChannelDetails_get_outbound_capacity_msat(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelDetails_get_outbound_capacity_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_outbound_capacity_msat(ChannelDetails this_ptr, long val) {
-               bindings.ChannelDetails_set_outbound_capacity_msat(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_outbound_capacity_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_inbound_capacity_msat(ChannelDetails this_ptr) {
-               long ret = bindings.ChannelDetails_get_inbound_capacity_msat(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelDetails_get_inbound_capacity_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_inbound_capacity_msat(ChannelDetails this_ptr, long val) {
-               bindings.ChannelDetails_set_inbound_capacity_msat(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_inbound_capacity_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_is_live(ChannelDetails this_ptr) {
-               boolean ret = bindings.ChannelDetails_get_is_live(this_ptr.ptr & ~1);
+               boolean ret = bindings.ChannelDetails_get_is_live(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_is_live(ChannelDetails this_ptr, boolean val) {
-               bindings.ChannelDetails_set_is_live(this_ptr.ptr & ~1, val);
+               bindings.ChannelDetails_set_is_live(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index a01e2a57201bd71090a63d6fc40746100c4fe804..f8cea8fd91409ef0c43133ebf3ddbabba61ca154 100644 (file)
@@ -11,40 +11,40 @@ public class ChannelHandshakeConfig extends CommonBase {
        }
 
        public ChannelHandshakeConfig(ChannelHandshakeConfig orig) {
-               super(bindings.ChannelHandshakeConfig_clone(orig.ptr & ~1));
+               super(bindings.ChannelHandshakeConfig_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public int get_minimum_depth(ChannelHandshakeConfig this_ptr) {
-               int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this_ptr.ptr & ~1);
+               int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_minimum_depth(ChannelHandshakeConfig this_ptr, int val) {
-               bindings.ChannelHandshakeConfig_set_minimum_depth(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeConfig_set_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_our_to_self_delay(ChannelHandshakeConfig this_ptr) {
-               short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr.ptr & ~1);
+               short ret = bindings.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_our_to_self_delay(ChannelHandshakeConfig this_ptr, short val) {
-               bindings.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_our_htlc_minimum_msat(ChannelHandshakeConfig this_ptr) {
-               long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_our_htlc_minimum_msat(ChannelHandshakeConfig this_ptr, long val) {
-               bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 2d6ed0ea7cb0db4df260afa0ebd3721ba5970514..309e07b14cef6c2a74073f429dcf09a6796da268 100644 (file)
@@ -11,117 +11,117 @@ public class ChannelHandshakeLimits extends CommonBase {
        }
 
        public ChannelHandshakeLimits(ChannelHandshakeLimits orig) {
-               super(bindings.ChannelHandshakeLimits_clone(orig.ptr & ~1));
+               super(bindings.ChannelHandshakeLimits_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public long get_min_funding_satoshis(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_min_funding_satoshis(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_htlc_minimum_msat(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_min_max_htlc_value_in_flight_msat(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_channel_reserve_satoshis(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr) {
-               short ret = bindings.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr.ptr & ~1);
+               short ret = bindings.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_min_max_accepted_htlcs(ChannelHandshakeLimits this_ptr, short val) {
-               bindings.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_min_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr) {
-               long ret = bindings.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_dust_limit_satoshis(ChannelHandshakeLimits this_ptr, long val) {
-               bindings.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_max_minimum_depth(ChannelHandshakeLimits this_ptr) {
-               int ret = bindings.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr.ptr & ~1);
+               int ret = bindings.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_minimum_depth(ChannelHandshakeLimits this_ptr, int val) {
-               bindings.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_force_announced_channel_preference(ChannelHandshakeLimits this_ptr) {
-               boolean ret = bindings.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr.ptr & ~1);
+               boolean ret = bindings.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_force_announced_channel_preference(ChannelHandshakeLimits this_ptr, boolean val) {
-               bindings.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_their_to_self_delay(ChannelHandshakeLimits this_ptr) {
-               short ret = bindings.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr.ptr & ~1);
+               short ret = bindings.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_their_to_self_delay(ChannelHandshakeLimits this_ptr, short val) {
-               bindings.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr.ptr & ~1, val);
+               bindings.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index e92dc7eb4541e071f123bccb58bc7ef64e5411d7..67537203842af2cf7dfcd5b5769a7a35d1e34ccf 100644 (file)
@@ -11,71 +11,71 @@ public class ChannelInfo extends CommonBase {
        }
 
        public ChannelFeatures get_features(ChannelInfo this_ptr) {
-               ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr.ptr & ~1));
+               ChannelFeatures ret = new ChannelFeatures(null, bindings.ChannelInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_features(ChannelInfo this_ptr, ChannelFeatures val) {
-               bindings.ChannelInfo_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public byte[] get_node_one(ChannelInfo this_ptr) {
-               byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelInfo_get_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_one(ChannelInfo this_ptr, byte[] val) {
-               bindings.ChannelInfo_set_node_one(this_ptr.ptr & ~1, val);
+               bindings.ChannelInfo_set_node_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public DirectionalChannelInfo get_one_to_two(ChannelInfo this_ptr) {
-               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr.ptr & ~1));
+               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_one_to_two(ChannelInfo this_ptr, DirectionalChannelInfo val) {
-               bindings.ChannelInfo_set_one_to_two(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_one_to_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public byte[] get_node_two(ChannelInfo this_ptr) {
-               byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelInfo_get_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_two(ChannelInfo this_ptr, byte[] val) {
-               bindings.ChannelInfo_set_node_two(this_ptr.ptr & ~1, val);
+               bindings.ChannelInfo_set_node_two(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public DirectionalChannelInfo get_two_to_one(ChannelInfo this_ptr) {
-               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr.ptr & ~1));
+               DirectionalChannelInfo ret = new DirectionalChannelInfo(null, bindings.ChannelInfo_get_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_two_to_one(ChannelInfo this_ptr, DirectionalChannelInfo val) {
-               bindings.ChannelInfo_set_two_to_one(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_two_to_one(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelAnnouncement get_announcement_message(ChannelInfo this_ptr) {
-               ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr.ptr & ~1));
+               ChannelAnnouncement ret = new ChannelAnnouncement(null, bindings.ChannelInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_announcement_message(ChannelInfo this_ptr, ChannelAnnouncement val) {
-               bindings.ChannelInfo_set_announcement_message(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index dc0a0cd0ea580e42eb3af2038063004147244175..de426fff61de68ad9dfaeec69915fc07962066e7 100644 (file)
@@ -34,7 +34,7 @@ public class ChannelKeys extends CommonBase {
        // Skipped ChannelKeys_call_sign_closing_transaction
        // Skipped ChannelKeys_call_sign_channel_announcement
        public void call_on_accept(ChannelPublicKeys channel_points, short counterparty_selected_contest_delay, short holder_selected_contest_delay) {
-               bindings.ChannelKeys_call_on_accept(this.ptr, channel_points.ptr & ~1, counterparty_selected_contest_delay, holder_selected_contest_delay);
+               bindings.ChannelKeys_call_on_accept(this.ptr, channel_points == null ? 0 : channel_points.ptr & ~1, counterparty_selected_contest_delay, holder_selected_contest_delay);
                this.ptrs_to.add(channel_points);
        }
 
index 901a288d731c9d7a8053bef1ecff42ae1db0cb27..dbf4fedaeccf18e9bb53ea97a5e8dce395b55234 100644 (file)
@@ -11,7 +11,7 @@ public class ChannelManager extends CommonBase {
        }
 
        public ChannelManager(LDKNetwork network, FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, long current_blockchain_height) {
-               super(bindings.ChannelManager_new(network, fee_est.ptr, chain_monitor.ptr, tx_broadcaster.ptr, logger.ptr, keys_manager.ptr, config.ptr & ~1, current_blockchain_height));
+               super(bindings.ChannelManager_new(network, fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, current_blockchain_height));
                this.ptrs_to.add(fee_est);
                this.ptrs_to.add(chain_monitor);
                this.ptrs_to.add(tx_broadcaster);
@@ -34,7 +34,7 @@ public class ChannelManager extends CommonBase {
 
        // Skipped ChannelManager_send_payment
        public void funding_transaction_generated(byte[] temporary_channel_id, OutPoint funding_txo) {
-               bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id, funding_txo.ptr & ~1);
+               bindings.ChannelManager_funding_transaction_generated(this.ptr, temporary_channel_id, funding_txo == null ? 0 : funding_txo.ptr & ~1);
                this.ptrs_to.add(funding_txo);
        }
 
@@ -63,7 +63,7 @@ public class ChannelManager extends CommonBase {
        }
 
        public void channel_monitor_updated(OutPoint funding_txo, long highest_applied_update_id) {
-               bindings.ChannelManager_channel_monitor_updated(this.ptr, funding_txo.ptr & ~1, highest_applied_update_id);
+               bindings.ChannelManager_channel_monitor_updated(this.ptr, funding_txo == null ? 0 : funding_txo.ptr & ~1, highest_applied_update_id);
                this.ptrs_to.add(funding_txo);
        }
 
index a7151a53743476b87ee5c37aaaca375a61286cc8..de7bf4a66be55b6667daebeff0477337734afe00 100644 (file)
@@ -11,78 +11,78 @@ public class ChannelManagerReadArgs extends CommonBase {
        }
 
        public KeysInterface get_keys_manager(ChannelManagerReadArgs this_ptr) {
-               KeysInterface ret = new KeysInterface(null, bindings.ChannelManagerReadArgs_get_keys_manager(this_ptr.ptr & ~1));
+               KeysInterface ret = new KeysInterface(null, bindings.ChannelManagerReadArgs_get_keys_manager(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_keys_manager(ChannelManagerReadArgs this_ptr, KeysInterface val) {
-               bindings.ChannelManagerReadArgs_set_keys_manager(this_ptr.ptr & ~1, val.ptr);
+               bindings.ChannelManagerReadArgs_set_keys_manager(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public FeeEstimator get_fee_estimator(ChannelManagerReadArgs this_ptr) {
-               FeeEstimator ret = new FeeEstimator(null, bindings.ChannelManagerReadArgs_get_fee_estimator(this_ptr.ptr & ~1));
+               FeeEstimator ret = new FeeEstimator(null, bindings.ChannelManagerReadArgs_get_fee_estimator(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_estimator(ChannelManagerReadArgs this_ptr, FeeEstimator val) {
-               bindings.ChannelManagerReadArgs_set_fee_estimator(this_ptr.ptr & ~1, val.ptr);
+               bindings.ChannelManagerReadArgs_set_fee_estimator(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public Watch get_chain_monitor(ChannelManagerReadArgs this_ptr) {
-               Watch ret = new Watch(null, bindings.ChannelManagerReadArgs_get_chain_monitor(this_ptr.ptr & ~1));
+               Watch ret = new Watch(null, bindings.ChannelManagerReadArgs_get_chain_monitor(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_monitor(ChannelManagerReadArgs this_ptr, Watch val) {
-               bindings.ChannelManagerReadArgs_set_chain_monitor(this_ptr.ptr & ~1, val.ptr);
+               bindings.ChannelManagerReadArgs_set_chain_monitor(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public BroadcasterInterface get_tx_broadcaster(ChannelManagerReadArgs this_ptr) {
-               BroadcasterInterface ret = new BroadcasterInterface(null, bindings.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr.ptr & ~1));
+               BroadcasterInterface ret = new BroadcasterInterface(null, bindings.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_tx_broadcaster(ChannelManagerReadArgs this_ptr, BroadcasterInterface val) {
-               bindings.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr.ptr & ~1, val.ptr);
+               bindings.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public Logger get_logger(ChannelManagerReadArgs this_ptr) {
-               Logger ret = new Logger(null, bindings.ChannelManagerReadArgs_get_logger(this_ptr.ptr & ~1));
+               Logger ret = new Logger(null, bindings.ChannelManagerReadArgs_get_logger(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_logger(ChannelManagerReadArgs this_ptr, Logger val) {
-               bindings.ChannelManagerReadArgs_set_logger(this_ptr.ptr & ~1, val.ptr);
+               bindings.ChannelManagerReadArgs_set_logger(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public UserConfig get_default_config(ChannelManagerReadArgs this_ptr) {
-               UserConfig ret = new UserConfig(null, bindings.ChannelManagerReadArgs_get_default_config(this_ptr.ptr & ~1));
+               UserConfig ret = new UserConfig(null, bindings.ChannelManagerReadArgs_get_default_config(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_default_config(ChannelManagerReadArgs this_ptr, UserConfig val) {
-               bindings.ChannelManagerReadArgs_set_default_config(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelManagerReadArgs_set_default_config(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index c1de1fb53ba78a61b8cc4b7a64fcdc1b6615233b..a981ecab48e354f70a0b6d11e574fbafe53a7253 100644 (file)
@@ -16,79 +16,79 @@ public class ChannelMessageHandler extends CommonBase {
        }
 
        public void call_handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) {
-               bindings.ChannelMessageHandler_call_handle_open_channel(this.ptr, their_node_id, their_features.ptr & ~1, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) {
-               bindings.ChannelMessageHandler_call_handle_accept_channel(this.ptr, their_node_id, their_features.ptr & ~1, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_funding_created(byte[] their_node_id, FundingCreated msg) {
-               bindings.ChannelMessageHandler_call_handle_funding_created(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_funding_created(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_funding_signed(byte[] their_node_id, FundingSigned msg) {
-               bindings.ChannelMessageHandler_call_handle_funding_signed(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_funding_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_funding_locked(byte[] their_node_id, FundingLocked msg) {
-               bindings.ChannelMessageHandler_call_handle_funding_locked(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_funding_locked(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_shutdown(byte[] their_node_id, Shutdown msg) {
-               bindings.ChannelMessageHandler_call_handle_shutdown(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_closing_signed(byte[] their_node_id, ClosingSigned msg) {
-               bindings.ChannelMessageHandler_call_handle_closing_signed(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_closing_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg) {
-               bindings.ChannelMessageHandler_call_handle_update_add_htlc(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_update_add_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg) {
-               bindings.ChannelMessageHandler_call_handle_update_fulfill_htlc(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_update_fulfill_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_update_fail_htlc(byte[] their_node_id, UpdateFailHTLC msg) {
-               bindings.ChannelMessageHandler_call_handle_update_fail_htlc(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_update_fail_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_update_fail_malformed_htlc(byte[] their_node_id, UpdateFailMalformedHTLC msg) {
-               bindings.ChannelMessageHandler_call_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_update_fail_malformed_htlc(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_commitment_signed(byte[] their_node_id, CommitmentSigned msg) {
-               bindings.ChannelMessageHandler_call_handle_commitment_signed(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_commitment_signed(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_revoke_and_ack(byte[] their_node_id, RevokeAndACK msg) {
-               bindings.ChannelMessageHandler_call_handle_revoke_and_ack(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_revoke_and_ack(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_update_fee(byte[] their_node_id, UpdateFee msg) {
-               bindings.ChannelMessageHandler_call_handle_update_fee(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_update_fee(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_announcement_signatures(byte[] their_node_id, AnnouncementSignatures msg) {
-               bindings.ChannelMessageHandler_call_handle_announcement_signatures(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_announcement_signatures(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
@@ -97,17 +97,17 @@ public class ChannelMessageHandler extends CommonBase {
        }
 
        public void call_peer_connected(byte[] their_node_id, Init msg) {
-               bindings.ChannelMessageHandler_call_peer_connected(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_peer_connected(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_channel_reestablish(byte[] their_node_id, ChannelReestablish msg) {
-               bindings.ChannelMessageHandler_call_handle_channel_reestablish(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_channel_reestablish(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
        public void call_handle_error(byte[] their_node_id, ErrorMessage msg) {
-               bindings.ChannelMessageHandler_call_handle_error(this.ptr, their_node_id, msg.ptr & ~1);
+               bindings.ChannelMessageHandler_call_handle_error(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(msg);
        }
 
index b30c18475df834d416e3ae259ad04e590679b3ee..7bb8249973227d970eee2af2b98cc33f098a94c2 100644 (file)
@@ -22,7 +22,7 @@ public class ChannelMonitor extends CommonBase {
        // Skipped ChannelMonitor_get_latest_holder_commitment_txn
        // Skipped ChannelMonitor_block_connected
        public void block_disconnected(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               bindings.ChannelMonitor_block_disconnected(this.ptr, header, height, broadcaster.ptr, fee_estimator.ptr, logger.ptr);
+               bindings.ChannelMonitor_block_disconnected(this.ptr, header, height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
index 2f914b560c34f2369724f580df182fbb074a8151..fdf417d501b05f9bf7dea5101ed034cc546e0f40 100644 (file)
@@ -11,18 +11,18 @@ public class ChannelMonitorUpdate extends CommonBase {
        }
 
        public ChannelMonitorUpdate(ChannelMonitorUpdate orig) {
-               super(bindings.ChannelMonitorUpdate_clone(orig.ptr & ~1));
+               super(bindings.ChannelMonitorUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public long get_update_id(ChannelMonitorUpdate this_ptr) {
-               long ret = bindings.ChannelMonitorUpdate_get_update_id(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelMonitorUpdate_get_update_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_update_id(ChannelMonitorUpdate this_ptr, long val) {
-               bindings.ChannelMonitorUpdate_set_update_id(this_ptr.ptr & ~1, val);
+               bindings.ChannelMonitorUpdate_set_update_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index edabb75b7bde8bf553e20b5007f423a8228191be..45fbc7d8052601262d03ef294495487b528f5808 100644 (file)
@@ -11,62 +11,62 @@ public class ChannelPublicKeys extends CommonBase {
        }
 
        public ChannelPublicKeys(ChannelPublicKeys orig) {
-               super(bindings.ChannelPublicKeys_clone(orig.ptr & ~1));
+               super(bindings.ChannelPublicKeys_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_funding_pubkey(ChannelPublicKeys this_ptr) {
-               byte[] ret = bindings.ChannelPublicKeys_get_funding_pubkey(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelPublicKeys_get_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_pubkey(ChannelPublicKeys this_ptr, byte[] val) {
-               bindings.ChannelPublicKeys_set_funding_pubkey(this_ptr.ptr & ~1, val);
+               bindings.ChannelPublicKeys_set_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_revocation_basepoint(ChannelPublicKeys this_ptr) {
-               byte[] ret = bindings.ChannelPublicKeys_get_revocation_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelPublicKeys_get_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_revocation_basepoint(ChannelPublicKeys this_ptr, byte[] val) {
-               bindings.ChannelPublicKeys_set_revocation_basepoint(this_ptr.ptr & ~1, val);
+               bindings.ChannelPublicKeys_set_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_point(ChannelPublicKeys this_ptr) {
-               byte[] ret = bindings.ChannelPublicKeys_get_payment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelPublicKeys_get_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_point(ChannelPublicKeys this_ptr, byte[] val) {
-               bindings.ChannelPublicKeys_set_payment_point(this_ptr.ptr & ~1, val);
+               bindings.ChannelPublicKeys_set_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_delayed_payment_basepoint(ChannelPublicKeys this_ptr) {
-               byte[] ret = bindings.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_delayed_payment_basepoint(ChannelPublicKeys this_ptr, byte[] val) {
-               bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr.ptr & ~1, val);
+               bindings.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_htlc_basepoint(ChannelPublicKeys this_ptr) {
-               byte[] ret = bindings.ChannelPublicKeys_get_htlc_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelPublicKeys_get_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_basepoint(ChannelPublicKeys this_ptr, byte[] val) {
-               bindings.ChannelPublicKeys_set_htlc_basepoint(this_ptr.ptr & ~1, val);
+               bindings.ChannelPublicKeys_set_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index ee92dc0f266b20cfe84b669032cd453017e97ea0..476c924518f351ec413894dcc732e6ed7420dbd9 100644 (file)
@@ -11,40 +11,40 @@ public class ChannelReestablish extends CommonBase {
        }
 
        public ChannelReestablish(ChannelReestablish orig) {
-               super(bindings.ChannelReestablish_clone(orig.ptr & ~1));
+               super(bindings.ChannelReestablish_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(ChannelReestablish this_ptr) {
-               byte[] ret = bindings.ChannelReestablish_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelReestablish_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(ChannelReestablish this_ptr, byte[] val) {
-               bindings.ChannelReestablish_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.ChannelReestablish_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_next_local_commitment_number(ChannelReestablish this_ptr) {
-               long ret = bindings.ChannelReestablish_get_next_local_commitment_number(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelReestablish_get_next_local_commitment_number(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_next_local_commitment_number(ChannelReestablish this_ptr, long val) {
-               bindings.ChannelReestablish_set_next_local_commitment_number(this_ptr.ptr & ~1, val);
+               bindings.ChannelReestablish_set_next_local_commitment_number(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_next_remote_commitment_number(ChannelReestablish this_ptr) {
-               long ret = bindings.ChannelReestablish_get_next_remote_commitment_number(this_ptr.ptr & ~1);
+               long ret = bindings.ChannelReestablish_get_next_remote_commitment_number(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_next_remote_commitment_number(ChannelReestablish this_ptr, long val) {
-               bindings.ChannelReestablish_set_next_remote_commitment_number(this_ptr.ptr & ~1, val);
+               bindings.ChannelReestablish_set_next_remote_commitment_number(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index f71d5cb92f0f8537300d255227b8aa0a7eae3bc2..5dc086156f02762082b7e94d083c1393572b8b63 100644 (file)
@@ -11,35 +11,35 @@ public class ChannelUpdate extends CommonBase {
        }
 
        public ChannelUpdate(ChannelUpdate orig) {
-               super(bindings.ChannelUpdate_clone(orig.ptr & ~1));
+               super(bindings.ChannelUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_signature(ChannelUpdate this_ptr) {
-               byte[] ret = bindings.ChannelUpdate_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ChannelUpdate_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(ChannelUpdate this_ptr, byte[] val) {
-               bindings.ChannelUpdate_set_signature(this_ptr.ptr & ~1, val);
+               bindings.ChannelUpdate_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public UnsignedChannelUpdate get_contents(ChannelUpdate this_ptr) {
-               UnsignedChannelUpdate ret = new UnsignedChannelUpdate(null, bindings.ChannelUpdate_get_contents(this_ptr.ptr & ~1));
+               UnsignedChannelUpdate ret = new UnsignedChannelUpdate(null, bindings.ChannelUpdate_get_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_contents(ChannelUpdate this_ptr, UnsignedChannelUpdate val) {
-               bindings.ChannelUpdate_set_contents(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.ChannelUpdate_set_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelUpdate(byte[] signature_arg, UnsignedChannelUpdate contents_arg) {
-               super(bindings.ChannelUpdate_new(signature_arg, contents_arg.ptr & ~1));
+               super(bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1));
                this.ptrs_to.add(contents_arg);
        }
 
index 25edd17cfdde4c1158f6af38e0da38f953cde17b..4d30d0b20795b21faa7a0c4e4ba547e21b588d6a 100644 (file)
@@ -11,40 +11,40 @@ public class ClosingSigned extends CommonBase {
        }
 
        public ClosingSigned(ClosingSigned orig) {
-               super(bindings.ClosingSigned_clone(orig.ptr & ~1));
+               super(bindings.ClosingSigned_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(ClosingSigned this_ptr) {
-               byte[] ret = bindings.ClosingSigned_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ClosingSigned_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(ClosingSigned this_ptr, byte[] val) {
-               bindings.ClosingSigned_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.ClosingSigned_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_fee_satoshis(ClosingSigned this_ptr) {
-               long ret = bindings.ClosingSigned_get_fee_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.ClosingSigned_get_fee_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_satoshis(ClosingSigned this_ptr, long val) {
-               bindings.ClosingSigned_set_fee_satoshis(this_ptr.ptr & ~1, val);
+               bindings.ClosingSigned_set_fee_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_signature(ClosingSigned this_ptr) {
-               byte[] ret = bindings.ClosingSigned_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ClosingSigned_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(ClosingSigned this_ptr, byte[] val) {
-               bindings.ClosingSigned_set_signature(this_ptr.ptr & ~1, val);
+               bindings.ClosingSigned_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index cb7870de4fa5ef80925a6fbc26f4b4a5cb837c6a..1a8b6aa7bb812bd912ef2882ddcc5fbb62be5222 100644 (file)
@@ -11,29 +11,29 @@ public class CommitmentSigned extends CommonBase {
        }
 
        public CommitmentSigned(CommitmentSigned orig) {
-               super(bindings.CommitmentSigned_clone(orig.ptr & ~1));
+               super(bindings.CommitmentSigned_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(CommitmentSigned this_ptr) {
-               byte[] ret = bindings.CommitmentSigned_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.CommitmentSigned_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(CommitmentSigned this_ptr, byte[] val) {
-               bindings.CommitmentSigned_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.CommitmentSigned_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_signature(CommitmentSigned this_ptr) {
-               byte[] ret = bindings.CommitmentSigned_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.CommitmentSigned_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(CommitmentSigned this_ptr, byte[] val) {
-               bindings.CommitmentSigned_set_signature(this_ptr.ptr & ~1, val);
+               bindings.CommitmentSigned_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index d886689d383bb0b8865dd1ec7c01d54175b54c8a..a5de9e9d07b0cf0001ed8ac2e295d6642e9053ae 100644 (file)
@@ -11,7 +11,7 @@ public class CommitmentUpdate extends CommonBase {
        }
 
        public CommitmentUpdate(CommitmentUpdate orig) {
-               super(bindings.CommitmentUpdate_clone(orig.ptr & ~1));
+               super(bindings.CommitmentUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
@@ -20,25 +20,25 @@ public class CommitmentUpdate extends CommonBase {
        // Skipped CommitmentUpdate_set_update_fail_htlcs
        // Skipped CommitmentUpdate_set_update_fail_malformed_htlcs
        public UpdateFee get_update_fee(CommitmentUpdate this_ptr) {
-               UpdateFee ret = new UpdateFee(null, bindings.CommitmentUpdate_get_update_fee(this_ptr.ptr & ~1));
+               UpdateFee ret = new UpdateFee(null, bindings.CommitmentUpdate_get_update_fee(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_update_fee(CommitmentUpdate this_ptr, UpdateFee val) {
-               bindings.CommitmentUpdate_set_update_fee(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.CommitmentUpdate_set_update_fee(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public CommitmentSigned get_commitment_signed(CommitmentUpdate this_ptr) {
-               CommitmentSigned ret = new CommitmentSigned(null, bindings.CommitmentUpdate_get_commitment_signed(this_ptr.ptr & ~1));
+               CommitmentSigned ret = new CommitmentSigned(null, bindings.CommitmentUpdate_get_commitment_signed(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_commitment_signed(CommitmentUpdate this_ptr, CommitmentSigned val) {
-               bindings.CommitmentUpdate_set_commitment_signed(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.CommitmentUpdate_set_commitment_signed(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index dc59351fa153a2120fe8323d27ceb5f6ab824364..47f90cf9a0d95e91c8d3eec9a6992fd1eb143113 100644 (file)
@@ -11,29 +11,29 @@ public class DataLossProtect extends CommonBase {
        }
 
        public DataLossProtect(DataLossProtect orig) {
-               super(bindings.DataLossProtect_clone(orig.ptr & ~1));
+               super(bindings.DataLossProtect_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_your_last_per_commitment_secret(DataLossProtect this_ptr) {
-               byte[] ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this_ptr.ptr & ~1);
+               byte[] ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_your_last_per_commitment_secret(DataLossProtect this_ptr, byte[] val) {
-               bindings.DataLossProtect_set_your_last_per_commitment_secret(this_ptr.ptr & ~1, val);
+               bindings.DataLossProtect_set_your_last_per_commitment_secret(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_my_current_per_commitment_point(DataLossProtect this_ptr) {
-               byte[] ret = bindings.DataLossProtect_get_my_current_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.DataLossProtect_get_my_current_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_my_current_per_commitment_point(DataLossProtect this_ptr, byte[] val) {
-               bindings.DataLossProtect_set_my_current_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.DataLossProtect_set_my_current_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index a0f879051525cebdc6aff977a36eaec0e0f3faf7..c708cbed48f4597aa61d40f7b284b2f9e685e6fd 100644 (file)
@@ -11,57 +11,57 @@ public class DirectionalChannelInfo extends CommonBase {
        }
 
        public int get_last_update(DirectionalChannelInfo this_ptr) {
-               int ret = bindings.DirectionalChannelInfo_get_last_update(this_ptr.ptr & ~1);
+               int ret = bindings.DirectionalChannelInfo_get_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_last_update(DirectionalChannelInfo this_ptr, int val) {
-               bindings.DirectionalChannelInfo_set_last_update(this_ptr.ptr & ~1, val);
+               bindings.DirectionalChannelInfo_set_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_enabled(DirectionalChannelInfo this_ptr) {
-               boolean ret = bindings.DirectionalChannelInfo_get_enabled(this_ptr.ptr & ~1);
+               boolean ret = bindings.DirectionalChannelInfo_get_enabled(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_enabled(DirectionalChannelInfo this_ptr, boolean val) {
-               bindings.DirectionalChannelInfo_set_enabled(this_ptr.ptr & ~1, val);
+               bindings.DirectionalChannelInfo_set_enabled(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_cltv_expiry_delta(DirectionalChannelInfo this_ptr) {
-               short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr.ptr & ~1);
+               short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry_delta(DirectionalChannelInfo this_ptr, short val) {
-               bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
+               bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_minimum_msat(DirectionalChannelInfo this_ptr) {
-               long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_minimum_msat(DirectionalChannelInfo this_ptr, long val) {
-               bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public ChannelUpdate get_last_update_message(DirectionalChannelInfo this_ptr) {
-               ChannelUpdate ret = new ChannelUpdate(null, bindings.DirectionalChannelInfo_get_last_update_message(this_ptr.ptr & ~1));
+               ChannelUpdate ret = new ChannelUpdate(null, bindings.DirectionalChannelInfo_get_last_update_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_last_update_message(DirectionalChannelInfo this_ptr, ChannelUpdate val) {
-               bindings.DirectionalChannelInfo_set_last_update_message(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.DirectionalChannelInfo_set_last_update_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index 1ca776f5f7024f86ad896730d7fcfd09a9730715..b63931d68a0c82e47a9da5235ac74d21009aa4b4 100644 (file)
@@ -11,18 +11,18 @@ public class ErrorMessage extends CommonBase {
        }
 
        public ErrorMessage(ErrorMessage orig) {
-               super(bindings.ErrorMessage_clone(orig.ptr & ~1));
+               super(bindings.ErrorMessage_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(ErrorMessage this_ptr) {
-               byte[] ret = bindings.ErrorMessage_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ErrorMessage_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(ErrorMessage this_ptr, byte[] val) {
-               bindings.ErrorMessage_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.ErrorMessage_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index da80074d1ca7b420c14ed8fa601de276f32ab389..ffc2cbaa4e3a12031e53ecb49af25a14200cc137 100644 (file)
@@ -20,7 +20,7 @@ public class Filter extends CommonBase {
        }
 
        public void call_register_output(OutPoint outpoint, byte[] script_pubkey) {
-               bindings.Filter_call_register_output(this.ptr, outpoint.ptr & ~1, script_pubkey);
+               bindings.Filter_call_register_output(this.ptr, outpoint == null ? 0 : outpoint.ptr & ~1, script_pubkey);
                this.ptrs_to.add(outpoint);
        }
 
index 66f485110998da2aa0b43e65f71f0f4f0150f84c..e199467cbe3b083c3f5308c1bae80f8d8daff1b3 100644 (file)
@@ -11,51 +11,51 @@ public class FundingCreated extends CommonBase {
        }
 
        public FundingCreated(FundingCreated orig) {
-               super(bindings.FundingCreated_clone(orig.ptr & ~1));
+               super(bindings.FundingCreated_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_temporary_channel_id(FundingCreated this_ptr) {
-               byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_temporary_channel_id(FundingCreated this_ptr, byte[] val) {
-               bindings.FundingCreated_set_temporary_channel_id(this_ptr.ptr & ~1, val);
+               bindings.FundingCreated_set_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_funding_txid(FundingCreated this_ptr) {
-               byte[] ret = bindings.FundingCreated_get_funding_txid(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingCreated_get_funding_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_txid(FundingCreated this_ptr, byte[] val) {
-               bindings.FundingCreated_set_funding_txid(this_ptr.ptr & ~1, val);
+               bindings.FundingCreated_set_funding_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_funding_output_index(FundingCreated this_ptr) {
-               short ret = bindings.FundingCreated_get_funding_output_index(this_ptr.ptr & ~1);
+               short ret = bindings.FundingCreated_get_funding_output_index(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_output_index(FundingCreated this_ptr, short val) {
-               bindings.FundingCreated_set_funding_output_index(this_ptr.ptr & ~1, val);
+               bindings.FundingCreated_set_funding_output_index(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_signature(FundingCreated this_ptr) {
-               byte[] ret = bindings.FundingCreated_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingCreated_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(FundingCreated this_ptr, byte[] val) {
-               bindings.FundingCreated_set_signature(this_ptr.ptr & ~1, val);
+               bindings.FundingCreated_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index b330b6505f9ce9deb7c897b313ed697e87d84dfe..1cd857e7ca468c08fa312f850086195a67d43c5b 100644 (file)
@@ -11,29 +11,29 @@ public class FundingLocked extends CommonBase {
        }
 
        public FundingLocked(FundingLocked orig) {
-               super(bindings.FundingLocked_clone(orig.ptr & ~1));
+               super(bindings.FundingLocked_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(FundingLocked this_ptr) {
-               byte[] ret = bindings.FundingLocked_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingLocked_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(FundingLocked this_ptr, byte[] val) {
-               bindings.FundingLocked_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.FundingLocked_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_next_per_commitment_point(FundingLocked this_ptr) {
-               byte[] ret = bindings.FundingLocked_get_next_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingLocked_get_next_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_next_per_commitment_point(FundingLocked this_ptr, byte[] val) {
-               bindings.FundingLocked_set_next_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.FundingLocked_set_next_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index fa19de1928ee2c8aa58441cd6f54fa1e04fdf8f0..528194345d2488e6ff4105db2d223a8e8517e9ee 100644 (file)
@@ -11,29 +11,29 @@ public class FundingSigned extends CommonBase {
        }
 
        public FundingSigned(FundingSigned orig) {
-               super(bindings.FundingSigned_clone(orig.ptr & ~1));
+               super(bindings.FundingSigned_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(FundingSigned this_ptr) {
-               byte[] ret = bindings.FundingSigned_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingSigned_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(FundingSigned this_ptr, byte[] val) {
-               bindings.FundingSigned_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.FundingSigned_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_signature(FundingSigned this_ptr) {
-               byte[] ret = bindings.FundingSigned_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.FundingSigned_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(FundingSigned this_ptr, byte[] val) {
-               bindings.FundingSigned_set_signature(this_ptr.ptr & ~1, val);
+               bindings.FundingSigned_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index a7b184c56757e99d99fb67c09756861c3fb78c57..5d5cc30b5df61dbf8d46cee809db2d5991d02cea 100644 (file)
@@ -11,40 +11,40 @@ public class GossipTimestampFilter extends CommonBase {
        }
 
        public GossipTimestampFilter(GossipTimestampFilter orig) {
-               super(bindings.GossipTimestampFilter_clone(orig.ptr & ~1));
+               super(bindings.GossipTimestampFilter_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(GossipTimestampFilter this_ptr) {
-               byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(GossipTimestampFilter this_ptr, byte[] val) {
-               bindings.GossipTimestampFilter_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.GossipTimestampFilter_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_first_timestamp(GossipTimestampFilter this_ptr) {
-               int ret = bindings.GossipTimestampFilter_get_first_timestamp(this_ptr.ptr & ~1);
+               int ret = bindings.GossipTimestampFilter_get_first_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_timestamp(GossipTimestampFilter this_ptr, int val) {
-               bindings.GossipTimestampFilter_set_first_timestamp(this_ptr.ptr & ~1, val);
+               bindings.GossipTimestampFilter_set_first_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_timestamp_range(GossipTimestampFilter this_ptr) {
-               int ret = bindings.GossipTimestampFilter_get_timestamp_range(this_ptr.ptr & ~1);
+               int ret = bindings.GossipTimestampFilter_get_timestamp_range(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_timestamp_range(GossipTimestampFilter this_ptr, int val) {
-               bindings.GossipTimestampFilter_set_timestamp_range(this_ptr.ptr & ~1, val);
+               bindings.GossipTimestampFilter_set_timestamp_range(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index f1286044db4db094e9e3f35341fa719cd1bebc57..d25beabeb4a3553e665586f771c7bf00b61e3b73 100644 (file)
@@ -11,51 +11,51 @@ public class HTLCOutputInCommitment extends CommonBase {
        }
 
        public HTLCOutputInCommitment(HTLCOutputInCommitment orig) {
-               super(bindings.HTLCOutputInCommitment_clone(orig.ptr & ~1));
+               super(bindings.HTLCOutputInCommitment_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public boolean get_offered(HTLCOutputInCommitment this_ptr) {
-               boolean ret = bindings.HTLCOutputInCommitment_get_offered(this_ptr.ptr & ~1);
+               boolean ret = bindings.HTLCOutputInCommitment_get_offered(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_offered(HTLCOutputInCommitment this_ptr, boolean val) {
-               bindings.HTLCOutputInCommitment_set_offered(this_ptr.ptr & ~1, val);
+               bindings.HTLCOutputInCommitment_set_offered(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_amount_msat(HTLCOutputInCommitment this_ptr) {
-               long ret = bindings.HTLCOutputInCommitment_get_amount_msat(this_ptr.ptr & ~1);
+               long ret = bindings.HTLCOutputInCommitment_get_amount_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_amount_msat(HTLCOutputInCommitment this_ptr, long val) {
-               bindings.HTLCOutputInCommitment_set_amount_msat(this_ptr.ptr & ~1, val);
+               bindings.HTLCOutputInCommitment_set_amount_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_cltv_expiry(HTLCOutputInCommitment this_ptr) {
-               int ret = bindings.HTLCOutputInCommitment_get_cltv_expiry(this_ptr.ptr & ~1);
+               int ret = bindings.HTLCOutputInCommitment_get_cltv_expiry(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry(HTLCOutputInCommitment this_ptr, int val) {
-               bindings.HTLCOutputInCommitment_set_cltv_expiry(this_ptr.ptr & ~1, val);
+               bindings.HTLCOutputInCommitment_set_cltv_expiry(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_hash(HTLCOutputInCommitment this_ptr) {
-               byte[] ret = bindings.HTLCOutputInCommitment_get_payment_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.HTLCOutputInCommitment_get_payment_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_hash(HTLCOutputInCommitment this_ptr, byte[] val) {
-               bindings.HTLCOutputInCommitment_set_payment_hash(this_ptr.ptr & ~1, val);
+               bindings.HTLCOutputInCommitment_set_payment_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index f1bb07be604bc63830f3be4cddb8c379821ed61f..01e06eb7bd8f6623eda25a30b7e7d707805353d6 100644 (file)
@@ -11,7 +11,7 @@ public class HTLCUpdate extends CommonBase {
        }
 
        public HTLCUpdate(HTLCUpdate orig) {
-               super(bindings.HTLCUpdate_clone(orig.ptr & ~1));
+               super(bindings.HTLCUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
index 92e15aa40de1a6f2e8a4995e1d001b59954ed0c5..aa729ac7d91ce971df9061a03a4e3d9cee1b2905 100644 (file)
@@ -11,31 +11,31 @@ public class HolderCommitmentTransaction extends CommonBase {
        }
 
        public HolderCommitmentTransaction(HolderCommitmentTransaction orig) {
-               super(bindings.HolderCommitmentTransaction_clone(orig.ptr & ~1));
+               super(bindings.HolderCommitmentTransaction_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        // Skipped HolderCommitmentTransaction_get_unsigned_tx
        // Skipped HolderCommitmentTransaction_set_unsigned_tx
        public byte[] get_counterparty_sig(HolderCommitmentTransaction this_ptr) {
-               byte[] ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this_ptr.ptr & ~1);
+               byte[] ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_counterparty_sig(HolderCommitmentTransaction this_ptr, byte[] val) {
-               bindings.HolderCommitmentTransaction_set_counterparty_sig(this_ptr.ptr & ~1, val);
+               bindings.HolderCommitmentTransaction_set_counterparty_sig(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_feerate_per_kw(HolderCommitmentTransaction this_ptr) {
-               int ret = bindings.HolderCommitmentTransaction_get_feerate_per_kw(this_ptr.ptr & ~1);
+               int ret = bindings.HolderCommitmentTransaction_get_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_feerate_per_kw(HolderCommitmentTransaction this_ptr, int val) {
-               bindings.HolderCommitmentTransaction_set_feerate_per_kw(this_ptr.ptr & ~1, val);
+               bindings.HolderCommitmentTransaction_set_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 2d4b54f77ba3223a59413950e6ff62374582408e..1740e663900f07d61e002cc6274beba34e1d4ae3 100644 (file)
@@ -11,73 +11,73 @@ public class InMemoryChannelKeys extends CommonBase {
        }
 
        public InMemoryChannelKeys(InMemoryChannelKeys orig) {
-               super(bindings.InMemoryChannelKeys_clone(orig.ptr & ~1));
+               super(bindings.InMemoryChannelKeys_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_funding_key(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_key(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_funding_key(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_funding_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_revocation_base_key(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_revocation_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_revocation_base_key(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_revocation_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_key(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_key(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_payment_key(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_delayed_payment_base_key(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_delayed_payment_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_htlc_base_key(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_base_key(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_htlc_base_key(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_htlc_base_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_commitment_seed(InMemoryChannelKeys this_ptr) {
-               byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this_ptr.ptr & ~1);
+               byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_commitment_seed(InMemoryChannelKeys this_ptr, byte[] val) {
-               bindings.InMemoryChannelKeys_set_commitment_seed(this_ptr.ptr & ~1, val);
+               bindings.InMemoryChannelKeys_set_commitment_seed(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 3061c7e49bb9f57f89dcb6a4975dc58d8ade2d7f..576e95c3aa22d985ec09cb4529b99fbf498a86f9 100644 (file)
@@ -11,7 +11,7 @@ public class Init extends CommonBase {
        }
 
        public Init(Init orig) {
-               super(bindings.Init_clone(orig.ptr & ~1));
+               super(bindings.Init_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
index 32fc51a326ac4a5f2b27014f6fb4a6f73b39e18b..b6246cd431e8044235d50bc4462dad8878a809e5 100644 (file)
@@ -11,33 +11,33 @@ public class MessageHandler extends CommonBase {
        }
 
        public ChannelMessageHandler get_chan_handler(MessageHandler this_ptr) {
-               ChannelMessageHandler ret = new ChannelMessageHandler(null, bindings.MessageHandler_get_chan_handler(this_ptr.ptr & ~1));
+               ChannelMessageHandler ret = new ChannelMessageHandler(null, bindings.MessageHandler_get_chan_handler(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chan_handler(MessageHandler this_ptr, ChannelMessageHandler val) {
-               bindings.MessageHandler_set_chan_handler(this_ptr.ptr & ~1, val.ptr);
+               bindings.MessageHandler_set_chan_handler(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public RoutingMessageHandler get_route_handler(MessageHandler this_ptr) {
-               RoutingMessageHandler ret = new RoutingMessageHandler(null, bindings.MessageHandler_get_route_handler(this_ptr.ptr & ~1));
+               RoutingMessageHandler ret = new RoutingMessageHandler(null, bindings.MessageHandler_get_route_handler(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                ret.ptrs_to.add(this);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_route_handler(MessageHandler this_ptr, RoutingMessageHandler val) {
-               bindings.MessageHandler_set_route_handler(this_ptr.ptr & ~1, val.ptr);
+               bindings.MessageHandler_set_route_handler(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public MessageHandler(ChannelMessageHandler chan_handler_arg, RoutingMessageHandler route_handler_arg) {
-               super(bindings.MessageHandler_new(chan_handler_arg.ptr, route_handler_arg.ptr));
+               super(bindings.MessageHandler_new(chan_handler_arg == null ? 0 : chan_handler_arg.ptr, route_handler_arg == null ? 0 : route_handler_arg.ptr));
                this.ptrs_to.add(chan_handler_arg);
                this.ptrs_to.add(route_handler_arg);
        }
index c873c8527555c1d4da9b7181189a07fad8f02d3d..02dfafc3fd7e62d3b9cd7c105e24ea822c244b07 100644 (file)
@@ -11,13 +11,13 @@ public class NetGraphMsgHandler extends CommonBase {
        }
 
        public NetGraphMsgHandler(Access chain_access, Logger logger) {
-               super(bindings.NetGraphMsgHandler_new(chain_access.ptr, logger.ptr));
+               super(bindings.NetGraphMsgHandler_new(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr));
                this.ptrs_to.add(chain_access);
                this.ptrs_to.add(logger);
        }
 
        public NetGraphMsgHandler(Access chain_access, Logger logger, NetworkGraph network_graph) {
-               super(bindings.NetGraphMsgHandler_from_net_graph(chain_access.ptr, logger.ptr, network_graph.ptr & ~1));
+               super(bindings.NetGraphMsgHandler_from_net_graph(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr, network_graph == null ? 0 : network_graph.ptr & ~1));
                this.ptrs_to.add(chain_access);
                this.ptrs_to.add(logger);
                this.ptrs_to.add(network_graph);
index 3b562117395a308ba00c5e743852b2b850c4dfe8..b114815fbef867cb40caf4acd7d485202d07f33d 100644 (file)
@@ -11,35 +11,35 @@ public class NodeAnnouncement extends CommonBase {
        }
 
        public NodeAnnouncement(NodeAnnouncement orig) {
-               super(bindings.NodeAnnouncement_clone(orig.ptr & ~1));
+               super(bindings.NodeAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_signature(NodeAnnouncement this_ptr) {
-               byte[] ret = bindings.NodeAnnouncement_get_signature(this_ptr.ptr & ~1);
+               byte[] ret = bindings.NodeAnnouncement_get_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_signature(NodeAnnouncement this_ptr, byte[] val) {
-               bindings.NodeAnnouncement_set_signature(this_ptr.ptr & ~1, val);
+               bindings.NodeAnnouncement_set_signature(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public UnsignedNodeAnnouncement get_contents(NodeAnnouncement this_ptr) {
-               UnsignedNodeAnnouncement ret = new UnsignedNodeAnnouncement(null, bindings.NodeAnnouncement_get_contents(this_ptr.ptr & ~1));
+               UnsignedNodeAnnouncement ret = new UnsignedNodeAnnouncement(null, bindings.NodeAnnouncement_get_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_contents(NodeAnnouncement this_ptr, UnsignedNodeAnnouncement val) {
-               bindings.NodeAnnouncement_set_contents(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.NodeAnnouncement_set_contents(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public NodeAnnouncement(byte[] signature_arg, UnsignedNodeAnnouncement contents_arg) {
-               super(bindings.NodeAnnouncement_new(signature_arg, contents_arg.ptr & ~1));
+               super(bindings.NodeAnnouncement_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1));
                this.ptrs_to.add(contents_arg);
        }
 
index ea257e8b99d11bc14c117168025f7d146f9910dd..2f55d6732b9ce902d77e486ab2ecb8a12c6c54f2 100644 (file)
@@ -11,59 +11,59 @@ public class NodeAnnouncementInfo extends CommonBase {
        }
 
        public NodeFeatures get_features(NodeAnnouncementInfo this_ptr) {
-               NodeFeatures ret = new NodeFeatures(null, bindings.NodeAnnouncementInfo_get_features(this_ptr.ptr & ~1));
+               NodeFeatures ret = new NodeFeatures(null, bindings.NodeAnnouncementInfo_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_features(NodeAnnouncementInfo this_ptr, NodeFeatures val) {
-               bindings.NodeAnnouncementInfo_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.NodeAnnouncementInfo_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public int get_last_update(NodeAnnouncementInfo this_ptr) {
-               int ret = bindings.NodeAnnouncementInfo_get_last_update(this_ptr.ptr & ~1);
+               int ret = bindings.NodeAnnouncementInfo_get_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_last_update(NodeAnnouncementInfo this_ptr, int val) {
-               bindings.NodeAnnouncementInfo_set_last_update(this_ptr.ptr & ~1, val);
+               bindings.NodeAnnouncementInfo_set_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_rgb(NodeAnnouncementInfo this_ptr) {
-               byte[] ret = bindings.NodeAnnouncementInfo_get_rgb(this_ptr.ptr & ~1);
+               byte[] ret = bindings.NodeAnnouncementInfo_get_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_rgb(NodeAnnouncementInfo this_ptr, byte[] val) {
-               bindings.NodeAnnouncementInfo_set_rgb(this_ptr.ptr & ~1, val);
+               bindings.NodeAnnouncementInfo_set_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_alias(NodeAnnouncementInfo this_ptr) {
-               byte[] ret = bindings.NodeAnnouncementInfo_get_alias(this_ptr.ptr & ~1);
+               byte[] ret = bindings.NodeAnnouncementInfo_get_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_alias(NodeAnnouncementInfo this_ptr, byte[] val) {
-               bindings.NodeAnnouncementInfo_set_alias(this_ptr.ptr & ~1, val);
+               bindings.NodeAnnouncementInfo_set_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        // Skipped NodeAnnouncementInfo_set_addresses
        public NodeAnnouncement get_announcement_message(NodeAnnouncementInfo this_ptr) {
-               NodeAnnouncement ret = new NodeAnnouncement(null, bindings.NodeAnnouncementInfo_get_announcement_message(this_ptr.ptr & ~1));
+               NodeAnnouncement ret = new NodeAnnouncement(null, bindings.NodeAnnouncementInfo_get_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_announcement_message(NodeAnnouncementInfo this_ptr, NodeAnnouncement val) {
-               bindings.NodeAnnouncementInfo_set_announcement_message(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.NodeAnnouncementInfo_set_announcement_message(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index 68af209d36af79287d80acd6feccd9c8e35ee8ff..e76ff9e760e5223a9ad435dc6ed7542d9f0a2284 100644 (file)
@@ -12,25 +12,25 @@ public class NodeInfo extends CommonBase {
 
        // Skipped NodeInfo_set_channels
        public RoutingFees get_lowest_inbound_channel_fees(NodeInfo this_ptr) {
-               RoutingFees ret = new RoutingFees(null, bindings.NodeInfo_get_lowest_inbound_channel_fees(this_ptr.ptr & ~1));
+               RoutingFees ret = new RoutingFees(null, bindings.NodeInfo_get_lowest_inbound_channel_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_lowest_inbound_channel_fees(NodeInfo this_ptr, RoutingFees val) {
-               bindings.NodeInfo_set_lowest_inbound_channel_fees(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.NodeInfo_set_lowest_inbound_channel_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public NodeAnnouncementInfo get_announcement_info(NodeInfo this_ptr) {
-               NodeAnnouncementInfo ret = new NodeAnnouncementInfo(null, bindings.NodeInfo_get_announcement_info(this_ptr.ptr & ~1));
+               NodeAnnouncementInfo ret = new NodeAnnouncementInfo(null, bindings.NodeInfo_get_announcement_info(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_announcement_info(NodeInfo this_ptr, NodeAnnouncementInfo val) {
-               bindings.NodeInfo_set_announcement_info(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.NodeInfo_set_announcement_info(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
index 88cbd24daea40f12cf967a84cb55b5ace49f97b2..87e7d1795661f86376ef0d552db323859807b8f4 100644 (file)
@@ -11,205 +11,205 @@ public class OpenChannel extends CommonBase {
        }
 
        public OpenChannel(OpenChannel orig) {
-               super(bindings.OpenChannel_clone(orig.ptr & ~1));
+               super(bindings.OpenChannel_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_temporary_channel_id(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_temporary_channel_id(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_temporary_channel_id(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_temporary_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_funding_satoshis(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_funding_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_satoshis(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_funding_satoshis(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_funding_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_push_msat(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_push_msat(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_push_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_push_msat(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_push_msat(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_push_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_dust_limit_satoshis(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_dust_limit_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_dust_limit_satoshis(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_dust_limit_satoshis(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_dust_limit_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_max_htlc_value_in_flight_msat(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_htlc_value_in_flight_msat(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_channel_reserve_satoshis(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_channel_reserve_satoshis(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_reserve_satoshis(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_channel_reserve_satoshis(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_channel_reserve_satoshis(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_minimum_msat(OpenChannel this_ptr) {
-               long ret = bindings.OpenChannel_get_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.OpenChannel_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_minimum_msat(OpenChannel this_ptr, long val) {
-               bindings.OpenChannel_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_feerate_per_kw(OpenChannel this_ptr) {
-               int ret = bindings.OpenChannel_get_feerate_per_kw(this_ptr.ptr & ~1);
+               int ret = bindings.OpenChannel_get_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_feerate_per_kw(OpenChannel this_ptr, int val) {
-               bindings.OpenChannel_set_feerate_per_kw(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_to_self_delay(OpenChannel this_ptr) {
-               short ret = bindings.OpenChannel_get_to_self_delay(this_ptr.ptr & ~1);
+               short ret = bindings.OpenChannel_get_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_to_self_delay(OpenChannel this_ptr, short val) {
-               bindings.OpenChannel_set_to_self_delay(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_to_self_delay(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_max_accepted_htlcs(OpenChannel this_ptr) {
-               short ret = bindings.OpenChannel_get_max_accepted_htlcs(this_ptr.ptr & ~1);
+               short ret = bindings.OpenChannel_get_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_max_accepted_htlcs(OpenChannel this_ptr, short val) {
-               bindings.OpenChannel_set_max_accepted_htlcs(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_max_accepted_htlcs(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_funding_pubkey(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_funding_pubkey(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_funding_pubkey(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_funding_pubkey(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_funding_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_revocation_basepoint(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_revocation_basepoint(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_revocation_basepoint(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_revocation_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_point(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_payment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_point(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_payment_point(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_payment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_delayed_payment_basepoint(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_delayed_payment_basepoint(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_delayed_payment_basepoint(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_delayed_payment_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_htlc_basepoint(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_basepoint(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_htlc_basepoint(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_htlc_basepoint(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_first_per_commitment_point(OpenChannel this_ptr) {
-               byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OpenChannel_get_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_per_commitment_point(OpenChannel this_ptr, byte[] val) {
-               bindings.OpenChannel_set_first_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_first_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte get_channel_flags(OpenChannel this_ptr) {
-               byte ret = bindings.OpenChannel_get_channel_flags(this_ptr.ptr & ~1);
+               byte ret = bindings.OpenChannel_get_channel_flags(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_flags(OpenChannel this_ptr, byte val) {
-               bindings.OpenChannel_set_channel_flags(this_ptr.ptr & ~1, val);
+               bindings.OpenChannel_set_channel_flags(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index aabd0d231c9658843fb1246ea2bed967e057494a..18229e76210dc76a254c4f056ca87ae3357e8da7 100644 (file)
@@ -11,29 +11,29 @@ public class OutPoint extends CommonBase {
        }
 
        public OutPoint(OutPoint orig) {
-               super(bindings.OutPoint_clone(orig.ptr & ~1));
+               super(bindings.OutPoint_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_txid(OutPoint this_ptr) {
-               byte[] ret = bindings.OutPoint_get_txid(this_ptr.ptr & ~1);
+               byte[] ret = bindings.OutPoint_get_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_txid(OutPoint this_ptr, byte[] val) {
-               bindings.OutPoint_set_txid(this_ptr.ptr & ~1, val);
+               bindings.OutPoint_set_txid(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_index(OutPoint this_ptr) {
-               short ret = bindings.OutPoint_get_index(this_ptr.ptr & ~1);
+               short ret = bindings.OutPoint_get_index(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_index(OutPoint this_ptr, short val) {
-               bindings.OutPoint_set_index(this_ptr.ptr & ~1, val);
+               bindings.OutPoint_set_index(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 391cb4705693cd35b00ddb7eee7941d925a7da3b..24c350e8606c9ae0692fe5734cd3a235866f9952 100644 (file)
@@ -11,13 +11,13 @@ public class PeerHandleError extends CommonBase {
        }
 
        public boolean get_no_connection_possible(PeerHandleError this_ptr) {
-               boolean ret = bindings.PeerHandleError_get_no_connection_possible(this_ptr.ptr & ~1);
+               boolean ret = bindings.PeerHandleError_get_no_connection_possible(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_no_connection_possible(PeerHandleError this_ptr, boolean val) {
-               bindings.PeerHandleError_set_no_connection_possible(this_ptr.ptr & ~1, val);
+               bindings.PeerHandleError_set_no_connection_possible(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 81d89509c5c49129c4b1336b12dda32d374cd876..62e50eed05e8853356e668ddba78dbaccf411aa1 100644 (file)
@@ -11,7 +11,7 @@ public class PeerManager extends CommonBase {
        }
 
        public PeerManager(MessageHandler message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, Logger logger) {
-               super(bindings.PeerManager_new(message_handler.ptr & ~1, our_node_secret, ephemeral_random_data, logger.ptr));
+               super(bindings.PeerManager_new(message_handler == null ? 0 : message_handler.ptr & ~1, our_node_secret, ephemeral_random_data, logger == null ? 0 : logger.ptr));
                this.ptrs_to.add(message_handler);
                this.ptrs_to.add(logger);
        }
@@ -26,7 +26,7 @@ public class PeerManager extends CommonBase {
        }
 
        public void socket_disconnected(SocketDescriptor descriptor) {
-               bindings.PeerManager_socket_disconnected(this.ptr, descriptor.ptr);
+               bindings.PeerManager_socket_disconnected(this.ptr, descriptor == null ? 0 : descriptor.ptr);
                this.ptrs_to.add(descriptor);
        }
 
index fed9c3433cc1f71a56ca4383502f9e877cd4ff40..e0e1b3d541ac1cddaf789d5a36d77c699540a9eb 100644 (file)
@@ -11,29 +11,29 @@ public class Ping extends CommonBase {
        }
 
        public Ping(Ping orig) {
-               super(bindings.Ping_clone(orig.ptr & ~1));
+               super(bindings.Ping_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public short get_ponglen(Ping this_ptr) {
-               short ret = bindings.Ping_get_ponglen(this_ptr.ptr & ~1);
+               short ret = bindings.Ping_get_ponglen(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_ponglen(Ping this_ptr, short val) {
-               bindings.Ping_set_ponglen(this_ptr.ptr & ~1, val);
+               bindings.Ping_set_ponglen(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_byteslen(Ping this_ptr) {
-               short ret = bindings.Ping_get_byteslen(this_ptr.ptr & ~1);
+               short ret = bindings.Ping_get_byteslen(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_byteslen(Ping this_ptr, short val) {
-               bindings.Ping_set_byteslen(this_ptr.ptr & ~1, val);
+               bindings.Ping_set_byteslen(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index fc98b396ae2abd8228c64e706de3cf1e0df9da5b..0ddec80cf976e41887b64b32950f3fd981738e9f 100644 (file)
@@ -11,18 +11,18 @@ public class Pong extends CommonBase {
        }
 
        public Pong(Pong orig) {
-               super(bindings.Pong_clone(orig.ptr & ~1));
+               super(bindings.Pong_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public short get_byteslen(Pong this_ptr) {
-               short ret = bindings.Pong_get_byteslen(this_ptr.ptr & ~1);
+               short ret = bindings.Pong_get_byteslen(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_byteslen(Pong this_ptr, short val) {
-               bindings.Pong_set_byteslen(this_ptr.ptr & ~1, val);
+               bindings.Pong_set_byteslen(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 45c8c29e82b1c262305e4d4d0f84d221bcf02ac5..2a88b8692aac1d77bd442addeb496af051bf7de6 100644 (file)
@@ -11,7 +11,7 @@ public class PreCalculatedTxCreationKeys extends CommonBase {
        }
 
        public PreCalculatedTxCreationKeys(TxCreationKeys keys) {
-               super(bindings.PreCalculatedTxCreationKeys_new(keys.ptr & ~1));
+               super(bindings.PreCalculatedTxCreationKeys_new(keys == null ? 0 : keys.ptr & ~1));
                this.ptrs_to.add(keys);
        }
 
index 70491a4d811cabde069bbb0136e1bf59c30a2a3a..c1a8b3f2ca970a5cafa05bf97034d90d750fde79 100644 (file)
@@ -11,40 +11,40 @@ public class QueryChannelRange extends CommonBase {
        }
 
        public QueryChannelRange(QueryChannelRange orig) {
-               super(bindings.QueryChannelRange_clone(orig.ptr & ~1));
+               super(bindings.QueryChannelRange_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(QueryChannelRange this_ptr) {
-               byte[] ret = bindings.QueryChannelRange_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.QueryChannelRange_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(QueryChannelRange this_ptr, byte[] val) {
-               bindings.QueryChannelRange_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.QueryChannelRange_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_first_blocknum(QueryChannelRange this_ptr) {
-               int ret = bindings.QueryChannelRange_get_first_blocknum(this_ptr.ptr & ~1);
+               int ret = bindings.QueryChannelRange_get_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_blocknum(QueryChannelRange this_ptr, int val) {
-               bindings.QueryChannelRange_set_first_blocknum(this_ptr.ptr & ~1, val);
+               bindings.QueryChannelRange_set_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_number_of_blocks(QueryChannelRange this_ptr) {
-               int ret = bindings.QueryChannelRange_get_number_of_blocks(this_ptr.ptr & ~1);
+               int ret = bindings.QueryChannelRange_get_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_number_of_blocks(QueryChannelRange this_ptr, int val) {
-               bindings.QueryChannelRange_set_number_of_blocks(this_ptr.ptr & ~1, val);
+               bindings.QueryChannelRange_set_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 68cc1304d41303660df3a29db13c0d20b066fd63..316e4f94688c2ad94cfe823185a261367c51bd01 100644 (file)
@@ -11,18 +11,18 @@ public class QueryShortChannelIds extends CommonBase {
        }
 
        public QueryShortChannelIds(QueryShortChannelIds orig) {
-               super(bindings.QueryShortChannelIds_clone(orig.ptr & ~1));
+               super(bindings.QueryShortChannelIds_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(QueryShortChannelIds this_ptr) {
-               byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(QueryShortChannelIds this_ptr, byte[] val) {
-               bindings.QueryShortChannelIds_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.QueryShortChannelIds_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 5457ced59f164c18890f57c045a64ced8ee311b3..43ccf5d2a805b749ff57514ac7e292556c340aec 100644 (file)
@@ -11,51 +11,51 @@ public class ReplyChannelRange extends CommonBase {
        }
 
        public ReplyChannelRange(ReplyChannelRange orig) {
-               super(bindings.ReplyChannelRange_clone(orig.ptr & ~1));
+               super(bindings.ReplyChannelRange_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(ReplyChannelRange this_ptr) {
-               byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(ReplyChannelRange this_ptr, byte[] val) {
-               bindings.ReplyChannelRange_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_first_blocknum(ReplyChannelRange this_ptr) {
-               int ret = bindings.ReplyChannelRange_get_first_blocknum(this_ptr.ptr & ~1);
+               int ret = bindings.ReplyChannelRange_get_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_first_blocknum(ReplyChannelRange this_ptr, int val) {
-               bindings.ReplyChannelRange_set_first_blocknum(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_first_blocknum(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_number_of_blocks(ReplyChannelRange this_ptr) {
-               int ret = bindings.ReplyChannelRange_get_number_of_blocks(this_ptr.ptr & ~1);
+               int ret = bindings.ReplyChannelRange_get_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_number_of_blocks(ReplyChannelRange this_ptr, int val) {
-               bindings.ReplyChannelRange_set_number_of_blocks(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_number_of_blocks(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_full_information(ReplyChannelRange this_ptr) {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this_ptr.ptr & ~1);
+               boolean ret = bindings.ReplyChannelRange_get_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_full_information(ReplyChannelRange this_ptr, boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this_ptr.ptr & ~1, val);
+               bindings.ReplyChannelRange_set_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 895988fa97564857523abcd7f136342ebbb1d99a..c04cd58abe436eb9b1262a6db40a7a7fe5dab85d 100644 (file)
@@ -11,29 +11,29 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
        }
 
        public ReplyShortChannelIdsEnd(ReplyShortChannelIdsEnd orig) {
-               super(bindings.ReplyShortChannelIdsEnd_clone(orig.ptr & ~1));
+               super(bindings.ReplyShortChannelIdsEnd_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(ReplyShortChannelIdsEnd this_ptr) {
-               byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(ReplyShortChannelIdsEnd this_ptr, byte[] val) {
-               bindings.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public boolean get_full_information(ReplyShortChannelIdsEnd this_ptr) {
-               boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this_ptr.ptr & ~1);
+               boolean ret = bindings.ReplyShortChannelIdsEnd_get_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_full_information(ReplyShortChannelIdsEnd this_ptr, boolean val) {
-               bindings.ReplyShortChannelIdsEnd_set_full_information(this_ptr.ptr & ~1, val);
+               bindings.ReplyShortChannelIdsEnd_set_full_information(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 514ded4babd564fb71f690b0d878dedd89aacc33..d887797c49d8fea0c1392219fd940425dd3aeba5 100644 (file)
@@ -11,40 +11,40 @@ public class RevokeAndACK extends CommonBase {
        }
 
        public RevokeAndACK(RevokeAndACK orig) {
-               super(bindings.RevokeAndACK_clone(orig.ptr & ~1));
+               super(bindings.RevokeAndACK_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(RevokeAndACK this_ptr) {
-               byte[] ret = bindings.RevokeAndACK_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.RevokeAndACK_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(RevokeAndACK this_ptr, byte[] val) {
-               bindings.RevokeAndACK_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.RevokeAndACK_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_per_commitment_secret(RevokeAndACK this_ptr) {
-               byte[] ret = bindings.RevokeAndACK_get_per_commitment_secret(this_ptr.ptr & ~1);
+               byte[] ret = bindings.RevokeAndACK_get_per_commitment_secret(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_per_commitment_secret(RevokeAndACK this_ptr, byte[] val) {
-               bindings.RevokeAndACK_set_per_commitment_secret(this_ptr.ptr & ~1, val);
+               bindings.RevokeAndACK_set_per_commitment_secret(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_next_per_commitment_point(RevokeAndACK this_ptr) {
-               byte[] ret = bindings.RevokeAndACK_get_next_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.RevokeAndACK_get_next_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_next_per_commitment_point(RevokeAndACK this_ptr, byte[] val) {
-               bindings.RevokeAndACK_set_next_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.RevokeAndACK_set_next_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index fe20cede09220d150fbe0981732681c9aa23908f..dc1f964516ff5d56bb8399b4a57342b1a9525626 100644 (file)
@@ -11,7 +11,7 @@ public class Route extends CommonBase {
        }
 
        public Route(Route orig) {
-               super(bindings.Route_clone(orig.ptr & ~1));
+               super(bindings.Route_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
index 52112e660ac99b967bdd57c7030ea9aebd75472e..71fdc7fee9a79cf5fcefe4de6e13c936ace49926 100644 (file)
@@ -11,68 +11,68 @@ public class RouteHint extends CommonBase {
        }
 
        public RouteHint(RouteHint orig) {
-               super(bindings.RouteHint_clone(orig.ptr & ~1));
+               super(bindings.RouteHint_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_src_node_id(RouteHint this_ptr) {
-               byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.RouteHint_get_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_src_node_id(RouteHint this_ptr, byte[] val) {
-               bindings.RouteHint_set_src_node_id(this_ptr.ptr & ~1, val);
+               bindings.RouteHint_set_src_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_short_channel_id(RouteHint this_ptr) {
-               long ret = bindings.RouteHint_get_short_channel_id(this_ptr.ptr & ~1);
+               long ret = bindings.RouteHint_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_short_channel_id(RouteHint this_ptr, long val) {
-               bindings.RouteHint_set_short_channel_id(this_ptr.ptr & ~1, val);
+               bindings.RouteHint_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public RoutingFees get_fees(RouteHint this_ptr) {
-               RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr.ptr & ~1));
+               RoutingFees ret = new RoutingFees(null, bindings.RouteHint_get_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fees(RouteHint this_ptr, RoutingFees val) {
-               bindings.RouteHint_set_fees(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.RouteHint_set_fees(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public short get_cltv_expiry_delta(RouteHint this_ptr) {
-               short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr.ptr & ~1);
+               short ret = bindings.RouteHint_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry_delta(RouteHint this_ptr, short val) {
-               bindings.RouteHint_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
+               bindings.RouteHint_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_minimum_msat(RouteHint this_ptr) {
-               long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.RouteHint_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_minimum_msat(RouteHint this_ptr, long val) {
-               bindings.RouteHint_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.RouteHint_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public RouteHint(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
-               super(bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg));
+               super(bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg));
                this.ptrs_to.add(fees_arg);
        }
 
index 496e4eb0a94443f4d2cee188caf629e0d9c9626a..54210f7ceb682211cf988b6962b2ec18692f7d79 100644 (file)
@@ -11,80 +11,80 @@ public class RouteHop extends CommonBase {
        }
 
        public RouteHop(RouteHop orig) {
-               super(bindings.RouteHop_clone(orig.ptr & ~1));
+               super(bindings.RouteHop_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_pubkey(RouteHop this_ptr) {
-               byte[] ret = bindings.RouteHop_get_pubkey(this_ptr.ptr & ~1);
+               byte[] ret = bindings.RouteHop_get_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_pubkey(RouteHop this_ptr, byte[] val) {
-               bindings.RouteHop_set_pubkey(this_ptr.ptr & ~1, val);
+               bindings.RouteHop_set_pubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public NodeFeatures get_node_features(RouteHop this_ptr) {
-               NodeFeatures ret = new NodeFeatures(null, bindings.RouteHop_get_node_features(this_ptr.ptr & ~1));
+               NodeFeatures ret = new NodeFeatures(null, bindings.RouteHop_get_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_features(RouteHop this_ptr, NodeFeatures val) {
-               bindings.RouteHop_set_node_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.RouteHop_set_node_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public long get_short_channel_id(RouteHop this_ptr) {
-               long ret = bindings.RouteHop_get_short_channel_id(this_ptr.ptr & ~1);
+               long ret = bindings.RouteHop_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_short_channel_id(RouteHop this_ptr, long val) {
-               bindings.RouteHop_set_short_channel_id(this_ptr.ptr & ~1, val);
+               bindings.RouteHop_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public ChannelFeatures get_channel_features(RouteHop this_ptr) {
-               ChannelFeatures ret = new ChannelFeatures(null, bindings.RouteHop_get_channel_features(this_ptr.ptr & ~1));
+               ChannelFeatures ret = new ChannelFeatures(null, bindings.RouteHop_get_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_features(RouteHop this_ptr, ChannelFeatures val) {
-               bindings.RouteHop_set_channel_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.RouteHop_set_channel_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public long get_fee_msat(RouteHop this_ptr) {
-               long ret = bindings.RouteHop_get_fee_msat(this_ptr.ptr & ~1);
+               long ret = bindings.RouteHop_get_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_msat(RouteHop this_ptr, long val) {
-               bindings.RouteHop_set_fee_msat(this_ptr.ptr & ~1, val);
+               bindings.RouteHop_set_fee_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_cltv_expiry_delta(RouteHop this_ptr) {
-               int ret = bindings.RouteHop_get_cltv_expiry_delta(this_ptr.ptr & ~1);
+               int ret = bindings.RouteHop_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry_delta(RouteHop this_ptr, int val) {
-               bindings.RouteHop_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
+               bindings.RouteHop_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public RouteHop(byte[] pubkey_arg, NodeFeatures node_features_arg, long short_channel_id_arg, ChannelFeatures channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg) {
-               super(bindings.RouteHop_new(pubkey_arg, node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg));
+               super(bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg));
                this.ptrs_to.add(node_features_arg);
                this.ptrs_to.add(channel_features_arg);
        }
index 215372fa7e71112bdef675084713fb4091c63af9..59f65ce5763cd066ed4601f115421f7332ed4f61 100644 (file)
@@ -11,29 +11,29 @@ public class RoutingFees extends CommonBase {
        }
 
        public RoutingFees(RoutingFees orig) {
-               super(bindings.RoutingFees_clone(orig.ptr & ~1));
+               super(bindings.RoutingFees_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public int get_base_msat(RoutingFees this_ptr) {
-               int ret = bindings.RoutingFees_get_base_msat(this_ptr.ptr & ~1);
+               int ret = bindings.RoutingFees_get_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_base_msat(RoutingFees this_ptr, int val) {
-               bindings.RoutingFees_set_base_msat(this_ptr.ptr & ~1, val);
+               bindings.RoutingFees_set_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_proportional_millionths(RoutingFees this_ptr) {
-               int ret = bindings.RoutingFees_get_proportional_millionths(this_ptr.ptr & ~1);
+               int ret = bindings.RoutingFees_get_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_proportional_millionths(RoutingFees this_ptr, int val) {
-               bindings.RoutingFees_set_proportional_millionths(this_ptr.ptr & ~1, val);
+               bindings.RoutingFees_set_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 09f1d36f208bcc661777987ab65a7b268f1dd115..8c690a9d3aba4379622f9a5e9fbd25dc428d1903 100644 (file)
@@ -11,23 +11,23 @@ public class Shutdown extends CommonBase {
        }
 
        public Shutdown(Shutdown orig) {
-               super(bindings.Shutdown_clone(orig.ptr & ~1));
+               super(bindings.Shutdown_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(Shutdown this_ptr) {
-               byte[] ret = bindings.Shutdown_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.Shutdown_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(Shutdown this_ptr, byte[] val) {
-               bindings.Shutdown_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.Shutdown_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_scriptpubkey(Shutdown this_ptr) {
-               byte[] ret = bindings.Shutdown_get_scriptpubkey(this_ptr.ptr & ~1);
+               byte[] ret = bindings.Shutdown_get_scriptpubkey(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
index 33132b806ced10c6647d91021622bb8fae68b6f5..39849ae595abcc7920e848751c7998c5d7747501 100644 (file)
@@ -11,62 +11,62 @@ public class TxCreationKeys extends CommonBase {
        }
 
        public TxCreationKeys(TxCreationKeys orig) {
-               super(bindings.TxCreationKeys_clone(orig.ptr & ~1));
+               super(bindings.TxCreationKeys_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_per_commitment_point(TxCreationKeys this_ptr) {
-               byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this_ptr.ptr & ~1);
+               byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_per_commitment_point(TxCreationKeys this_ptr, byte[] val) {
-               bindings.TxCreationKeys_set_per_commitment_point(this_ptr.ptr & ~1, val);
+               bindings.TxCreationKeys_set_per_commitment_point(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_revocation_key(TxCreationKeys this_ptr) {
-               byte[] ret = bindings.TxCreationKeys_get_revocation_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.TxCreationKeys_get_revocation_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_revocation_key(TxCreationKeys this_ptr, byte[] val) {
-               bindings.TxCreationKeys_set_revocation_key(this_ptr.ptr & ~1, val);
+               bindings.TxCreationKeys_set_revocation_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_broadcaster_htlc_key(TxCreationKeys this_ptr) {
-               byte[] ret = bindings.TxCreationKeys_get_broadcaster_htlc_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.TxCreationKeys_get_broadcaster_htlc_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_broadcaster_htlc_key(TxCreationKeys this_ptr, byte[] val) {
-               bindings.TxCreationKeys_set_broadcaster_htlc_key(this_ptr.ptr & ~1, val);
+               bindings.TxCreationKeys_set_broadcaster_htlc_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_countersignatory_htlc_key(TxCreationKeys this_ptr) {
-               byte[] ret = bindings.TxCreationKeys_get_countersignatory_htlc_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.TxCreationKeys_get_countersignatory_htlc_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_countersignatory_htlc_key(TxCreationKeys this_ptr, byte[] val) {
-               bindings.TxCreationKeys_set_countersignatory_htlc_key(this_ptr.ptr & ~1, val);
+               bindings.TxCreationKeys_set_countersignatory_htlc_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_broadcaster_delayed_payment_key(TxCreationKeys this_ptr) {
-               byte[] ret = bindings.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr.ptr & ~1);
+               byte[] ret = bindings.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_broadcaster_delayed_payment_key(TxCreationKeys this_ptr, byte[] val) {
-               bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr.ptr & ~1, val);
+               bindings.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 60c4042b87a394f6330855e577360b6cf8eea6a2..2d80ea4c06a5bc7007bf1b4d7d26560e137c02d8 100644 (file)
@@ -11,85 +11,85 @@ public class UnsignedChannelAnnouncement extends CommonBase {
        }
 
        public UnsignedChannelAnnouncement(UnsignedChannelAnnouncement orig) {
-               super(bindings.UnsignedChannelAnnouncement_clone(orig.ptr & ~1));
+               super(bindings.UnsignedChannelAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public ChannelFeatures get_features(UnsignedChannelAnnouncement this_ptr) {
-               ChannelFeatures ret = new ChannelFeatures(null, bindings.UnsignedChannelAnnouncement_get_features(this_ptr.ptr & ~1));
+               ChannelFeatures ret = new ChannelFeatures(null, bindings.UnsignedChannelAnnouncement_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_features(UnsignedChannelAnnouncement this_ptr, ChannelFeatures val) {
-               bindings.UnsignedChannelAnnouncement_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.UnsignedChannelAnnouncement_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public byte[] get_chain_hash(UnsignedChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelAnnouncement_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(UnsignedChannelAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedChannelAnnouncement_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_short_channel_id(UnsignedChannelAnnouncement this_ptr) {
-               long ret = bindings.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr.ptr & ~1);
+               long ret = bindings.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_short_channel_id(UnsignedChannelAnnouncement this_ptr, long val) {
-               bindings.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_node_id_1(UnsignedChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_get_node_id_1(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelAnnouncement_get_node_id_1(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_id_1(UnsignedChannelAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedChannelAnnouncement_set_node_id_1(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_node_id_1(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_node_id_2(UnsignedChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_get_node_id_2(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelAnnouncement_get_node_id_2(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_id_2(UnsignedChannelAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedChannelAnnouncement_set_node_id_2(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_node_id_2(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_bitcoin_key_1(UnsignedChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_bitcoin_key_1(UnsignedChannelAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_bitcoin_key_2(UnsignedChannelAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_bitcoin_key_2(UnsignedChannelAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 9147908830e7ae9bfd7773e6d7e7411948c0852f..f56cca90d569a01000236546e098cbf054224e15 100644 (file)
@@ -11,95 +11,95 @@ public class UnsignedChannelUpdate extends CommonBase {
        }
 
        public UnsignedChannelUpdate(UnsignedChannelUpdate orig) {
-               super(bindings.UnsignedChannelUpdate_clone(orig.ptr & ~1));
+               super(bindings.UnsignedChannelUpdate_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_chain_hash(UnsignedChannelUpdate this_ptr) {
-               byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_chain_hash(UnsignedChannelUpdate this_ptr, byte[] val) {
-               bindings.UnsignedChannelUpdate_set_chain_hash(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_chain_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_short_channel_id(UnsignedChannelUpdate this_ptr) {
-               long ret = bindings.UnsignedChannelUpdate_get_short_channel_id(this_ptr.ptr & ~1);
+               long ret = bindings.UnsignedChannelUpdate_get_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_short_channel_id(UnsignedChannelUpdate this_ptr, long val) {
-               bindings.UnsignedChannelUpdate_set_short_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_short_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_timestamp(UnsignedChannelUpdate this_ptr) {
-               int ret = bindings.UnsignedChannelUpdate_get_timestamp(this_ptr.ptr & ~1);
+               int ret = bindings.UnsignedChannelUpdate_get_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_timestamp(UnsignedChannelUpdate this_ptr, int val) {
-               bindings.UnsignedChannelUpdate_set_timestamp(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte get_flags(UnsignedChannelUpdate this_ptr) {
-               byte ret = bindings.UnsignedChannelUpdate_get_flags(this_ptr.ptr & ~1);
+               byte ret = bindings.UnsignedChannelUpdate_get_flags(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_flags(UnsignedChannelUpdate this_ptr, byte val) {
-               bindings.UnsignedChannelUpdate_set_flags(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_flags(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_cltv_expiry_delta(UnsignedChannelUpdate this_ptr) {
-               short ret = bindings.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr.ptr & ~1);
+               short ret = bindings.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry_delta(UnsignedChannelUpdate this_ptr, short val) {
-               bindings.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_minimum_msat(UnsignedChannelUpdate this_ptr) {
-               long ret = bindings.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr.ptr & ~1);
+               long ret = bindings.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_minimum_msat(UnsignedChannelUpdate this_ptr, long val) {
-               bindings.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_fee_base_msat(UnsignedChannelUpdate this_ptr) {
-               int ret = bindings.UnsignedChannelUpdate_get_fee_base_msat(this_ptr.ptr & ~1);
+               int ret = bindings.UnsignedChannelUpdate_get_fee_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_base_msat(UnsignedChannelUpdate this_ptr, int val) {
-               bindings.UnsignedChannelUpdate_set_fee_base_msat(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_fee_base_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_fee_proportional_millionths(UnsignedChannelUpdate this_ptr) {
-               int ret = bindings.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr.ptr & ~1);
+               int ret = bindings.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_fee_proportional_millionths(UnsignedChannelUpdate this_ptr, int val) {
-               bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr.ptr & ~1, val);
+               bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 51d93e3522a8e7d890905d692fe0fa849cb70f41..828432ec2c6685c23c3f020e83ccb3caf7c8954c 100644 (file)
@@ -11,63 +11,63 @@ public class UnsignedNodeAnnouncement extends CommonBase {
        }
 
        public UnsignedNodeAnnouncement(UnsignedNodeAnnouncement orig) {
-               super(bindings.UnsignedNodeAnnouncement_clone(orig.ptr & ~1));
+               super(bindings.UnsignedNodeAnnouncement_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public NodeFeatures get_features(UnsignedNodeAnnouncement this_ptr) {
-               NodeFeatures ret = new NodeFeatures(null, bindings.UnsignedNodeAnnouncement_get_features(this_ptr.ptr & ~1));
+               NodeFeatures ret = new NodeFeatures(null, bindings.UnsignedNodeAnnouncement_get_features(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_features(UnsignedNodeAnnouncement this_ptr, NodeFeatures val) {
-               bindings.UnsignedNodeAnnouncement_set_features(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.UnsignedNodeAnnouncement_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public int get_timestamp(UnsignedNodeAnnouncement this_ptr) {
-               int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this_ptr.ptr & ~1);
+               int ret = bindings.UnsignedNodeAnnouncement_get_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_timestamp(UnsignedNodeAnnouncement this_ptr, int val) {
-               bindings.UnsignedNodeAnnouncement_set_timestamp(this_ptr.ptr & ~1, val);
+               bindings.UnsignedNodeAnnouncement_set_timestamp(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_node_id(UnsignedNodeAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedNodeAnnouncement_get_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_node_id(UnsignedNodeAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedNodeAnnouncement_set_node_id(this_ptr.ptr & ~1, val);
+               bindings.UnsignedNodeAnnouncement_set_node_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_rgb(UnsignedNodeAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedNodeAnnouncement_get_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_rgb(UnsignedNodeAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedNodeAnnouncement_set_rgb(this_ptr.ptr & ~1, val);
+               bindings.UnsignedNodeAnnouncement_set_rgb(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_alias(UnsignedNodeAnnouncement this_ptr) {
-               byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UnsignedNodeAnnouncement_get_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_alias(UnsignedNodeAnnouncement this_ptr, byte[] val) {
-               bindings.UnsignedNodeAnnouncement_set_alias(this_ptr.ptr & ~1, val);
+               bindings.UnsignedNodeAnnouncement_set_alias(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index fd9d3e08dd147f738e5c6e8240ded5e87e81a06b..adca17e6c197965b74d1690576c64d2f37da2bc0 100644 (file)
@@ -11,62 +11,62 @@ public class UpdateAddHTLC extends CommonBase {
        }
 
        public UpdateAddHTLC(UpdateAddHTLC orig) {
-               super(bindings.UpdateAddHTLC_clone(orig.ptr & ~1));
+               super(bindings.UpdateAddHTLC_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(UpdateAddHTLC this_ptr) {
-               byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(UpdateAddHTLC this_ptr, byte[] val) {
-               bindings.UpdateAddHTLC_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateAddHTLC_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_id(UpdateAddHTLC this_ptr) {
-               long ret = bindings.UpdateAddHTLC_get_htlc_id(this_ptr.ptr & ~1);
+               long ret = bindings.UpdateAddHTLC_get_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_id(UpdateAddHTLC this_ptr, long val) {
-               bindings.UpdateAddHTLC_set_htlc_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateAddHTLC_set_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_amount_msat(UpdateAddHTLC this_ptr) {
-               long ret = bindings.UpdateAddHTLC_get_amount_msat(this_ptr.ptr & ~1);
+               long ret = bindings.UpdateAddHTLC_get_amount_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_amount_msat(UpdateAddHTLC this_ptr, long val) {
-               bindings.UpdateAddHTLC_set_amount_msat(this_ptr.ptr & ~1, val);
+               bindings.UpdateAddHTLC_set_amount_msat(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_hash(UpdateAddHTLC this_ptr) {
-               byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateAddHTLC_get_payment_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_hash(UpdateAddHTLC this_ptr, byte[] val) {
-               bindings.UpdateAddHTLC_set_payment_hash(this_ptr.ptr & ~1, val);
+               bindings.UpdateAddHTLC_set_payment_hash(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_cltv_expiry(UpdateAddHTLC this_ptr) {
-               int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this_ptr.ptr & ~1);
+               int ret = bindings.UpdateAddHTLC_get_cltv_expiry(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_cltv_expiry(UpdateAddHTLC this_ptr, int val) {
-               bindings.UpdateAddHTLC_set_cltv_expiry(this_ptr.ptr & ~1, val);
+               bindings.UpdateAddHTLC_set_cltv_expiry(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index edc4e8ccf0a16b0bed265528ec4ac4e7e8913019..b1cb03290b8e7952b4a66ba17133e25b54f0b6b7 100644 (file)
@@ -11,29 +11,29 @@ public class UpdateFailHTLC extends CommonBase {
        }
 
        public UpdateFailHTLC(UpdateFailHTLC orig) {
-               super(bindings.UpdateFailHTLC_clone(orig.ptr & ~1));
+               super(bindings.UpdateFailHTLC_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(UpdateFailHTLC this_ptr) {
-               byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(UpdateFailHTLC this_ptr, byte[] val) {
-               bindings.UpdateFailHTLC_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFailHTLC_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_id(UpdateFailHTLC this_ptr) {
-               long ret = bindings.UpdateFailHTLC_get_htlc_id(this_ptr.ptr & ~1);
+               long ret = bindings.UpdateFailHTLC_get_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_id(UpdateFailHTLC this_ptr, long val) {
-               bindings.UpdateFailHTLC_set_htlc_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFailHTLC_set_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 209cd0cc8fac6262d6bd85f2ecd2802b387be38a..8f414a988fe0f31bc03b05e775f2a7674ff7b498 100644 (file)
@@ -11,40 +11,40 @@ public class UpdateFailMalformedHTLC extends CommonBase {
        }
 
        public UpdateFailMalformedHTLC(UpdateFailMalformedHTLC orig) {
-               super(bindings.UpdateFailMalformedHTLC_clone(orig.ptr & ~1));
+               super(bindings.UpdateFailMalformedHTLC_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(UpdateFailMalformedHTLC this_ptr) {
-               byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(UpdateFailMalformedHTLC this_ptr, byte[] val) {
-               bindings.UpdateFailMalformedHTLC_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFailMalformedHTLC_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_id(UpdateFailMalformedHTLC this_ptr) {
-               long ret = bindings.UpdateFailMalformedHTLC_get_htlc_id(this_ptr.ptr & ~1);
+               long ret = bindings.UpdateFailMalformedHTLC_get_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_id(UpdateFailMalformedHTLC this_ptr, long val) {
-               bindings.UpdateFailMalformedHTLC_set_htlc_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFailMalformedHTLC_set_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public short get_failure_code(UpdateFailMalformedHTLC this_ptr) {
-               short ret = bindings.UpdateFailMalformedHTLC_get_failure_code(this_ptr.ptr & ~1);
+               short ret = bindings.UpdateFailMalformedHTLC_get_failure_code(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_failure_code(UpdateFailMalformedHTLC this_ptr, short val) {
-               bindings.UpdateFailMalformedHTLC_set_failure_code(this_ptr.ptr & ~1, val);
+               bindings.UpdateFailMalformedHTLC_set_failure_code(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 43623fb0f67c1f5ad5c11915256740cbbe4c84c6..9fd24408dbfa2100535dd7519b456d9e5b9880a0 100644 (file)
@@ -11,29 +11,29 @@ public class UpdateFee extends CommonBase {
        }
 
        public UpdateFee(UpdateFee orig) {
-               super(bindings.UpdateFee_clone(orig.ptr & ~1));
+               super(bindings.UpdateFee_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(UpdateFee this_ptr) {
-               byte[] ret = bindings.UpdateFee_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateFee_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(UpdateFee this_ptr, byte[] val) {
-               bindings.UpdateFee_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFee_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public int get_feerate_per_kw(UpdateFee this_ptr) {
-               int ret = bindings.UpdateFee_get_feerate_per_kw(this_ptr.ptr & ~1);
+               int ret = bindings.UpdateFee_get_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_feerate_per_kw(UpdateFee this_ptr, int val) {
-               bindings.UpdateFee_set_feerate_per_kw(this_ptr.ptr & ~1, val);
+               bindings.UpdateFee_set_feerate_per_kw(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 3db67761bcc39f60369167d8dec6fefec053ce31..96f5843009b78535d63049e591ac71682600af53 100644 (file)
@@ -11,40 +11,40 @@ public class UpdateFulfillHTLC extends CommonBase {
        }
 
        public UpdateFulfillHTLC(UpdateFulfillHTLC orig) {
-               super(bindings.UpdateFulfillHTLC_clone(orig.ptr & ~1));
+               super(bindings.UpdateFulfillHTLC_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public byte[] get_channel_id(UpdateFulfillHTLC this_ptr) {
-               byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_id(UpdateFulfillHTLC this_ptr, byte[] val) {
-               bindings.UpdateFulfillHTLC_set_channel_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFulfillHTLC_set_channel_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public long get_htlc_id(UpdateFulfillHTLC this_ptr) {
-               long ret = bindings.UpdateFulfillHTLC_get_htlc_id(this_ptr.ptr & ~1);
+               long ret = bindings.UpdateFulfillHTLC_get_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_htlc_id(UpdateFulfillHTLC this_ptr, long val) {
-               bindings.UpdateFulfillHTLC_set_htlc_id(this_ptr.ptr & ~1, val);
+               bindings.UpdateFulfillHTLC_set_htlc_id(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
        public byte[] get_payment_preimage(UpdateFulfillHTLC this_ptr) {
-               byte[] ret = bindings.UpdateFulfillHTLC_get_payment_preimage(this_ptr.ptr & ~1);
+               byte[] ret = bindings.UpdateFulfillHTLC_get_payment_preimage(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_payment_preimage(UpdateFulfillHTLC this_ptr, byte[] val) {
-               bindings.UpdateFulfillHTLC_set_payment_preimage(this_ptr.ptr & ~1, val);
+               bindings.UpdateFulfillHTLC_set_payment_preimage(this_ptr == null ? 0 : this_ptr.ptr & ~1, val);
                this.ptrs_to.add(this_ptr);
        }
 
index 0b1b072f06b1d89e90c6f904e72d23df6911d536..a22d021b2fe6fa6c53de5416805c9770ce57c097 100644 (file)
@@ -11,48 +11,48 @@ public class UserConfig extends CommonBase {
        }
 
        public UserConfig(UserConfig orig) {
-               super(bindings.UserConfig_clone(orig.ptr & ~1));
+               super(bindings.UserConfig_clone(orig == null ? 0 : orig.ptr & ~1));
                this.ptrs_to.add(orig);
        }
 
        public ChannelHandshakeConfig get_own_channel_config(UserConfig this_ptr) {
-               ChannelHandshakeConfig ret = new ChannelHandshakeConfig(null, bindings.UserConfig_get_own_channel_config(this_ptr.ptr & ~1));
+               ChannelHandshakeConfig ret = new ChannelHandshakeConfig(null, bindings.UserConfig_get_own_channel_config(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_own_channel_config(UserConfig this_ptr, ChannelHandshakeConfig val) {
-               bindings.UserConfig_set_own_channel_config(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.UserConfig_set_own_channel_config(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelHandshakeLimits get_peer_channel_config_limits(UserConfig this_ptr) {
-               ChannelHandshakeLimits ret = new ChannelHandshakeLimits(null, bindings.UserConfig_get_peer_channel_config_limits(this_ptr.ptr & ~1));
+               ChannelHandshakeLimits ret = new ChannelHandshakeLimits(null, bindings.UserConfig_get_peer_channel_config_limits(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_peer_channel_config_limits(UserConfig this_ptr, ChannelHandshakeLimits val) {
-               bindings.UserConfig_set_peer_channel_config_limits(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.UserConfig_set_peer_channel_config_limits(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public ChannelConfig get_channel_options(UserConfig this_ptr) {
-               ChannelConfig ret = new ChannelConfig(null, bindings.UserConfig_get_channel_options(this_ptr.ptr & ~1));
+               ChannelConfig ret = new ChannelConfig(null, bindings.UserConfig_get_channel_options(this_ptr == null ? 0 : this_ptr.ptr & ~1));
                this.ptrs_to.add(this_ptr);
                return ret;
        }
 
        public void set_channel_options(UserConfig this_ptr, ChannelConfig val) {
-               bindings.UserConfig_set_channel_options(this_ptr.ptr & ~1, val.ptr & ~1);
+               bindings.UserConfig_set_channel_options(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(this_ptr);
                this.ptrs_to.add(val);
        }
 
        public UserConfig(ChannelHandshakeConfig own_channel_config_arg, ChannelHandshakeLimits peer_channel_config_limits_arg, ChannelConfig channel_options_arg) {
-               super(bindings.UserConfig_new(own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg.ptr & ~1, channel_options_arg.ptr & ~1));
+               super(bindings.UserConfig_new(own_channel_config_arg == null ? 0 : own_channel_config_arg.ptr & ~1, peer_channel_config_limits_arg == null ? 0 : peer_channel_config_limits_arg.ptr & ~1, channel_options_arg == null ? 0 : channel_options_arg.ptr & ~1));
                this.ptrs_to.add(own_channel_config_arg);
                this.ptrs_to.add(peer_channel_config_limits_arg);
                this.ptrs_to.add(channel_options_arg);