Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/intl/icu_capi/bindings/js/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  ICU4XReorderedIndexMap.mjs   Sprache: unbekannt

 
import wasm from "./diplomat-wasm.mjs"
import * as diplomatRuntime from "./diplomat-runtime.mjs"

const ICU4XReorderedIndexMap_box_destroy_registry = new FinalizationRegistry(underlying => {
  wasm.ICU4XReorderedIndexMap_destroy(underlying);
});

export class ICU4XReorderedIndexMap {
  #lifetimeEdges = [];
  constructor(underlying, owned, edges) {
    this.underlying = underlying;
    this.#lifetimeEdges.push(...edges);
    if (owned) {
      ICU4XReorderedIndexMap_box_destroy_registry.register(this, underlying);
    }
  }

  as_slice() {
    return (() => {
      const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
      wasm.ICU4XReorderedIndexMap_as_slice(diplomat_receive_buffer, this.underlying);
      const [ptr, size] = new Uint32Array(wasm.memory.buffer, diplomat_receive_buffer, 2);
      wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
      return Uint32Array.from(new Uint32Array(wasm.memory.buffer, ptr, size));
    })();
  }

  len() {
    return wasm.ICU4XReorderedIndexMap_len(this.underlying);
  }

  is_empty() {
    return wasm.ICU4XReorderedIndexMap_is_empty(this.underlying);
  }

  get(arg_index) {
    return wasm.ICU4XReorderedIndexMap_get(this.underlying, arg_index);
  }
}

[ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ]