X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FResult_CVec_u8ZPeerHandleErrorZ.mts;h=275b1a31d8cb9b0a9f27c7976b844db2a4fffb16;hb=31a1b84c2ca25db2978865e9ca9573974f79cc79;hp=11630b34f05dd5a9c5584719c0f2fa199684fd42;hpb=e2bd9223757025980105f0aeb17900f17734b2e3;p=ldk-java diff --git a/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts b/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts index 11630b34..275b1a31 100644 --- a/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts +++ b/ts/structs/Result_CVec_u8ZPeerHandleErrorZ.mts @@ -358,11 +358,11 @@ import * as bindings from '../bindings.mjs' export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { - protected constructor(_dummy: object, ptr: number) { + protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.CResult_CVec_u8ZPeerHandleErrorZ_free); } /* @internal */ - public static constr_from_ptr(ptr: number): Result_CVec_u8ZPeerHandleErrorZ { + public static constr_from_ptr(ptr: bigint): Result_CVec_u8ZPeerHandleErrorZ { if (bindings.CResult_CVec_u8ZPeerHandleErrorZ_is_ok(ptr)) { return new Result_CVec_u8ZPeerHandleErrorZ_OK(null, ptr); } else { @@ -373,7 +373,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state. */ public static constructor_ok(o: Uint8Array): Result_CVec_u8ZPeerHandleErrorZ { - const ret: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(bindings.encodeUint8Array(o)); + const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_ok(bindings.encodeUint8Array(o)); const ret_hu_conv: Result_CVec_u8ZPeerHandleErrorZ = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -382,8 +382,9 @@ export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ public static constructor_err(e: PeerHandleError): Result_CVec_u8ZPeerHandleErrorZ { - const ret: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0 : CommonBase.get_ptr_of(e) & ~1); + const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_err(e == null ? 0n : CommonBase.get_ptr_of(e)); const ret_hu_conv: Result_CVec_u8ZPeerHandleErrorZ = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); + CommonBase.add_ref_from(ret_hu_conv, e); return ret_hu_conv; } @@ -395,8 +396,8 @@ export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { return ret; } - public clone_ptr(): number { - const ret: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(this.ptr); + public clone_ptr(): bigint { + const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(this.ptr); return ret; } @@ -405,7 +406,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ extends CommonBase { * but with all dynamically-allocated buffers duplicated in new buffers. */ public clone(): Result_CVec_u8ZPeerHandleErrorZ { - const ret: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr); + const ret: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_clone(this.ptr); const ret_hu_conv: Result_CVec_u8ZPeerHandleErrorZ = Result_CVec_u8ZPeerHandleErrorZ.constr_from_ptr(ret); return ret_hu_conv; } @@ -415,7 +416,7 @@ export class Result_CVec_u8ZPeerHandleErrorZ_OK extends Result_CVec_u8ZPeerHandl public res: Uint8Array; /* @internal */ - public constructor(_dummy: object, ptr: number) { + public constructor(_dummy: object, ptr: bigint) { super(_dummy, ptr); const res: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_ok(ptr); const res_conv: Uint8Array = bindings.decodeUint8Array(res); @@ -426,9 +427,9 @@ export class Result_CVec_u8ZPeerHandleErrorZ_Err extends Result_CVec_u8ZPeerHand public err: PeerHandleError; /* @internal */ - public constructor(_dummy: object, ptr: number) { + public constructor(_dummy: object, ptr: bigint) { super(_dummy, ptr); - const err: number = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_err(ptr); + const err: bigint = bindings.CResult_CVec_u8ZPeerHandleErrorZ_get_err(ptr); const err_hu_conv: PeerHandleError = new PeerHandleError(null, err); CommonBase.add_ref_from(err_hu_conv, this); this.err = err_hu_conv;