diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2021-08-11 12:27:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 12:27:05 +0200 |
| commit | a0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (patch) | |
| tree | 90671b004537e20f9493fd3277ffd21d30b39a0e /extensions/ffi/00_ffi.js | |
| parent | 3a6994115176781b3a93d70794b1b81bc95e42b4 (diff) | |
Rename extensions/ directory to ext/ (#11643)
Diffstat (limited to 'extensions/ffi/00_ffi.js')
| -rw-r--r-- | extensions/ffi/00_ffi.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/extensions/ffi/00_ffi.js b/extensions/ffi/00_ffi.js deleted file mode 100644 index 3c4112a47..000000000 --- a/extensions/ffi/00_ffi.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -"use strict"; - -((window) => { - const core = window.Deno.core; - - class DynamicLibrary { - #rid; - symbols = {}; - - constructor(path, symbols) { - this.#rid = core.opSync("op_ffi_load", { path, symbols }); - - for (const symbol in symbols) { - this.symbols[symbol] = (...parameters) => - core.opSync("op_ffi_call", { rid: this.#rid, symbol, parameters }); - } - } - - close() { - core.close(this.#rid); - } - } - - function dlopen(path, symbols) { - return new DynamicLibrary(path, symbols); - } - - window.__bootstrap.ffi = { dlopen }; -})(this); |
