-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKAcceptChannel res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKAnnouncementSignatures res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKChannelReestablish res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKClosingSigned res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *val = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKClosingSignedFeeRange res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *val = (LDKCResult_ClosingSignedFeeRangeDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKCommitmentSigned res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKFundingCreated res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKFundingSigned res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKFundingLocked res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKInit res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKOpenChannel res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKRevokeAndACK res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKShutdown res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUpdateFailHTLC res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUpdateFailMalformedHTLC res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUpdateFee res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUpdateFulfillHTLC res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUpdateAddHTLC res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKPing res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKPong res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKChannelAnnouncement res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUnsignedChannelUpdate res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKChannelUpdate res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKErrorMessage res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKNodeAnnouncement res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKQueryShortChannelIds res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKQueryChannelRange res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKReplyChannelRange res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(uint32_t arg) {
- LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
- CHECK(val->result_ok);
- LDKGossipTimestampFilter res_var = (*val->contents.result);
- uint64_t res_ref = 0;
- CHECK((((uint64_t)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(res_var);
- res_ref = (uint64_t)res_var.inner & ~1;
- return res_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(uint32_t arg) {
- LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
- CHECK(!val->result_ok);
- LDKDecodeError err_var = (*val->contents.err);
- uint64_t err_ref = 0;
- CHECK((((uint64_t)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
- CHECK((((uint64_t)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
- CHECK_INNER_FIELD_ACCESS_OR_NULL(err_var);
- err_ref = (uint64_t)err_var.inner & ~1;
- return err_ref;
-}
-uint32_t __attribute__((visibility("default"))) TS_LDKSignOrCreationError_ref_from_ptr(uint32_t ptr) {
- LDKSignOrCreationError *obj = (LDKSignOrCreationError*)(ptr & ~1);