X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FEventsProvider.ts;fp=ts%2Fstructs%2FEventsProvider.ts;h=5cec1ec3959d7f0740d3493c25ad5a7728339172;hb=246459dcbc3be28c38b4951140a5933f4b3aa024;hp=111c2a5b9cb8d5ad5c5455b868f6fb5857ef25e0;hpb=b52dde859c138f9257499496749d1eb89f9f6f43;p=ldk-java diff --git a/ts/structs/EventsProvider.ts b/ts/structs/EventsProvider.ts index 111c2a5b..5cec1ec3 100644 --- a/ts/structs/EventsProvider.ts +++ b/ts/structs/EventsProvider.ts @@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location // todo: in-line interface filling get_and_clear_pending_events (): number[] { Event[] ret = arg.get_and_clear_pending_events(); - result: number[] = (number[])Arrays.stream(ret).map(arr_conv_7 -> arr_conv_7.ptr).toArray(); + result: number[] = Arrays.stream(ret).map(ret_conv_7 -> ret_conv_7.ptr).toArray(number[]::new); /* TODO 2 Event */; return result; }, @@ -55,14 +55,14 @@ import * as bindings from '../bindings' // TODO: figure out location } public Event[] get_and_clear_pending_events() { number[] ret = bindings.EventsProvider_get_and_clear_pending_events(this.ptr); - Event[] arr_conv_7_arr = new Event[ret.length]; + Event[] ret_conv_7_arr = new Event[ret.length]; for (int h = 0; h < ret.length; h++) { - number arr_conv_7 = ret[h]; - Event arr_conv_7_hu_conv = Event.constr_from_ptr(arr_conv_7); - arr_conv_7_hu_conv.ptrs_to.add(this); - arr_conv_7_arr[h] = arr_conv_7_hu_conv; + number ret_conv_7 = ret[h]; + Event ret_conv_7_hu_conv = Event.constr_from_ptr(ret_conv_7); + ret_conv_7_hu_conv.ptrs_to.add(this); + ret_conv_7_arr[h] = ret_conv_7_hu_conv; } - return arr_conv_7_arr; + return ret_conv_7_arr; } }