koffi 2.14.1 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/build/koffi/darwin_arm64/koffi.node +0 -0
- package/build/koffi/darwin_x64/koffi.node +0 -0
- package/build/koffi/freebsd_arm64/koffi.node +0 -0
- package/build/koffi/freebsd_ia32/koffi.node +0 -0
- package/build/koffi/freebsd_x64/koffi.node +0 -0
- package/build/koffi/linux_arm64/koffi.node +0 -0
- package/build/koffi/linux_armhf/koffi.node +0 -0
- package/build/koffi/linux_ia32/koffi.node +0 -0
- package/build/koffi/linux_loong64/koffi.node +0 -0
- package/build/koffi/linux_riscv64d/koffi.node +0 -0
- package/build/koffi/linux_x64/koffi.node +0 -0
- package/build/koffi/musl_arm64/koffi.node +0 -0
- package/build/koffi/musl_x64/koffi.node +0 -0
- package/build/koffi/openbsd_ia32/koffi.node +0 -0
- package/build/koffi/openbsd_x64/koffi.node +0 -0
- package/build/koffi/win32_arm64/koffi.node +0 -0
- package/build/koffi/win32_ia32/koffi.node +0 -0
- package/build/koffi/win32_x64/koffi.node +0 -0
- package/doc/assets.ini +2 -1
- package/doc/build.sh +9 -0
- package/doc/pages/404.md +17 -0
- package/doc/pages/index.md +5 -3
- package/doc/pages/misc.md +18 -11
- package/doc/pages.ini +4 -0
- package/doc/static/highlight.js +2 -14
- package/doc/static/koffi.css +3 -15
- package/doc/static/print.css +2 -14
- package/doc/templates/code.html +1 -2
- package/doc/templates/page.html +1 -2
- package/index.d.ts +29 -24
- package/index.js +9 -9
- package/indirect.js +9 -9
- package/{src/core → lib/native}/base/base.cc +1137 -674
- package/{src/core → lib/native}/base/base.hh +362 -195
- package/{src/core → lib/native}/base/crc.inc +2 -20
- package/lib/native/base/crc_gen.py +72 -0
- package/{src/core → lib/native}/base/mimetypes.inc +2 -20
- package/{src/core → lib/native}/base/mimetypes_gen.py +2 -21
- package/lib/native/base/tower.cc +821 -0
- package/lib/native/base/tower.hh +81 -0
- package/{src/core → lib/native}/base/unicode.inc +2 -20
- package/{src/core → lib/native}/base/unicode_gen.py +4 -41
- package/package.json +2 -2
- package/src/cnoke/assets/FindCNoke.cmake +24 -30
- package/src/cnoke/assets/win_delay_hook.c +6 -20
- package/src/cnoke/cnoke.js +2 -21
- package/src/cnoke/src/builder.js +51 -66
- package/src/cnoke/src/index.js +2 -20
- package/src/cnoke/src/tools.js +2 -20
- package/src/koffi/CMakeLists.txt +30 -23
- package/src/koffi/cmake/raylib.cmake +5 -22
- package/src/koffi/cmake/sqlite3.cmake +2 -20
- package/src/koffi/src/abi_arm32.cc +7 -25
- package/src/koffi/src/abi_arm32_asm.S +2 -20
- package/src/koffi/src/abi_arm64.cc +7 -25
- package/src/koffi/src/abi_arm64_asm.S +2 -20
- package/src/koffi/src/abi_arm64_asm.asm +2 -20
- package/src/koffi/src/abi_loong64.cc +2 -20
- package/src/koffi/src/abi_loong64_asm.S +2 -20
- package/src/koffi/src/abi_riscv64.cc +7 -25
- package/src/koffi/src/abi_riscv64_asm.S +2 -20
- package/src/koffi/src/abi_x64_sysv.cc +7 -25
- package/src/koffi/src/abi_x64_sysv_asm.S +2 -20
- package/src/koffi/src/abi_x64_win.cc +12 -30
- package/src/koffi/src/abi_x64_win_asm.S +162 -0
- package/src/koffi/src/abi_x64_win_asm.asm +2 -20
- package/src/koffi/src/abi_x86.cc +7 -25
- package/src/koffi/src/abi_x86_asm.S +2 -20
- package/src/koffi/src/abi_x86_asm.asm +2 -20
- package/src/koffi/src/call.cc +25 -45
- package/src/koffi/src/call.hh +3 -21
- package/src/koffi/src/errno.inc +2 -20
- package/src/koffi/src/ffi.cc +64 -63
- package/src/koffi/src/ffi.hh +15 -30
- package/src/koffi/src/init.js +2 -20
- package/src/koffi/src/parser.cc +13 -27
- package/src/koffi/src/parser.hh +3 -21
- package/src/koffi/src/trampolines/armasm.inc +0 -21
- package/src/koffi/src/trampolines/gnu.inc +0 -21
- package/src/koffi/src/trampolines/masm32.inc +0 -21
- package/src/koffi/src/trampolines/masm64.inc +0 -21
- package/src/koffi/src/trampolines/prototypes.inc +0 -21
- package/src/koffi/src/util.cc +50 -64
- package/src/koffi/src/util.hh +8 -25
- package/src/koffi/src/uv.cc +193 -0
- package/src/koffi/src/uv.def +10 -0
- package/src/koffi/src/uv.hh +40 -0
- package/src/koffi/src/win32.cc +2 -20
- package/src/koffi/src/win32.hh +3 -21
- package/vendor/node-api-headers/CHANGELOG.md +22 -0
- package/vendor/node-api-headers/README.md +6 -17
- package/vendor/node-api-headers/include/js_native_api.h +3 -13
- package/vendor/node-api-headers/include/js_native_api_types.h +15 -0
- package/vendor/node-api-headers/include/node_api.h +0 -4
- package/vendor/node-api-headers/include/node_api_types.h +6 -0
- package/vendor/node-api-headers/include/uv/aix.h +32 -0
- package/vendor/node-api-headers/include/uv/bsd.h +34 -0
- package/vendor/node-api-headers/include/uv/darwin.h +61 -0
- package/vendor/node-api-headers/include/uv/errno.h +483 -0
- package/vendor/node-api-headers/include/uv/linux.h +34 -0
- package/vendor/node-api-headers/include/uv/os390.h +33 -0
- package/vendor/node-api-headers/include/uv/posix.h +31 -0
- package/vendor/node-api-headers/include/uv/sunos.h +44 -0
- package/vendor/node-api-headers/include/uv/threadpool.h +37 -0
- package/vendor/node-api-headers/include/uv/tree.h +521 -0
- package/vendor/node-api-headers/include/uv/unix.h +512 -0
- package/vendor/node-api-headers/include/uv/version.h +43 -0
- package/vendor/node-api-headers/include/uv/win.h +698 -0
- package/vendor/node-api-headers/include/uv.h +1990 -0
- package/vendor/node-api-headers/package.json +1 -1
- package/vendor/node-api-headers/scripts/update-headers.js +6 -0
- package/src/core/base/crc_gen.py +0 -109
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
#pragma once
|
|
4
|
+
|
|
5
|
+
#include "lib/native/base/base.hh"
|
|
6
|
+
|
|
7
|
+
#include <napi.h>
|
|
8
|
+
|
|
9
|
+
struct uv_poll_s;
|
|
10
|
+
typedef struct uv_poll_s uv_poll_t;
|
|
11
|
+
|
|
12
|
+
namespace K {
|
|
13
|
+
|
|
14
|
+
class PollHandle: public Napi::ObjectWrap<PollHandle> {
|
|
15
|
+
Napi::Env env = nullptr;
|
|
16
|
+
|
|
17
|
+
uv_poll_t *handle = nullptr;
|
|
18
|
+
Napi::FunctionReference callback;
|
|
19
|
+
|
|
20
|
+
public:
|
|
21
|
+
static Napi::Function Define(Napi::Env env);
|
|
22
|
+
|
|
23
|
+
PollHandle(const Napi::CallbackInfo &info);
|
|
24
|
+
~PollHandle() { Close(); }
|
|
25
|
+
|
|
26
|
+
void Start(const Napi::CallbackInfo &info);
|
|
27
|
+
void Stop(const Napi::CallbackInfo &info);
|
|
28
|
+
void Close(const Napi::CallbackInfo &info);
|
|
29
|
+
void Ref(const Napi::CallbackInfo &info);
|
|
30
|
+
void Unref(const Napi::CallbackInfo &info);
|
|
31
|
+
|
|
32
|
+
private:
|
|
33
|
+
void Close();
|
|
34
|
+
|
|
35
|
+
static void OnPoll(uv_poll_t *handle, int status, int events);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
Napi::Value Poll(const Napi::CallbackInfo &info);
|
|
39
|
+
|
|
40
|
+
}
|
package/src/koffi/src/win32.cc
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
-
// this software and associated documentation files (the “Software”), to deal in
|
|
5
|
-
// the Software without restriction, including without limitation the rights to use,
|
|
6
|
-
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
7
|
-
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
-
// subject to the following conditions:
|
|
9
|
-
//
|
|
10
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
11
|
-
// copies or substantial portions of the Software.
|
|
12
|
-
//
|
|
13
|
-
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
14
|
-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
15
|
-
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
16
|
-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
-
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
18
|
-
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
19
|
-
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
20
|
-
// OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// SPDX-FileCopyrightText: 2025 Niels Martignène <niels.martignene@protonmail.com>
|
|
21
3
|
|
|
22
4
|
#if defined(_WIN32)
|
|
23
5
|
|
package/src/koffi/src/win32.hh
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
-
// this software and associated documentation files (the “Software”), to deal in
|
|
5
|
-
// the Software without restriction, including without limitation the rights to use,
|
|
6
|
-
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
7
|
-
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
-
// subject to the following conditions:
|
|
9
|
-
//
|
|
10
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
11
|
-
// copies or substantial portions of the Software.
|
|
12
|
-
//
|
|
13
|
-
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
14
|
-
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
15
|
-
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
16
|
-
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
-
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
18
|
-
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
19
|
-
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
20
|
-
// OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// SPDX-FileCopyrightText: 2025 Niels Martignène <niels.martignene@protonmail.com>
|
|
21
3
|
|
|
22
4
|
#pragma once
|
|
23
5
|
|
|
24
|
-
#include "
|
|
6
|
+
#include "lib/native/base/base.hh"
|
|
25
7
|
|
|
26
8
|
#include <intrin.h>
|
|
27
9
|
#include <napi.h>
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# node-api-headers Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.0](https://github.com/nodejs/node-api-headers/compare/v1.7.0...v1.8.0) (2026-01-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update headers from nodejs/node tag v25.4.0 ([#70](https://github.com/nodejs/node-api-headers/issues/70)) ([ebc02e1](https://github.com/nodejs/node-api-headers/commit/ebc02e18357a4d49f127f094c144371948b60c84))
|
|
9
|
+
|
|
10
|
+
## [1.7.0](https://github.com/nodejs/node-api-headers/compare/v1.6.0...v1.7.0) (2025-11-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* update headers from nodejs/node tag v25.1.0 ([#65](https://github.com/nodejs/node-api-headers/issues/65)) ([f90f754](https://github.com/nodejs/node-api-headers/commit/f90f75459375cb4725914895aa418efefdde7af2))
|
|
16
|
+
* update headers from nodejs/node tag v25.2.1 ([#68](https://github.com/nodejs/node-api-headers/issues/68)) ([769031b](https://github.com/nodejs/node-api-headers/commit/769031b208acd820bf3f2c3b2cf9f8b4b2e2bd83))
|
|
17
|
+
|
|
18
|
+
## [1.6.0](https://github.com/nodejs/node-api-headers/compare/v1.5.0...v1.6.0) (2025-09-26)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* update headers from nodejs/node tag v24.9.0 ([#60](https://github.com/nodejs/node-api-headers/issues/60)) ([5963ef9](https://github.com/nodejs/node-api-headers/commit/5963ef9937c8f6bd8f33cb45c50f70bd9cbc0ffd))
|
|
24
|
+
|
|
3
25
|
## [1.5.0](https://github.com/nodejs/node-api-headers/compare/v1.4.0...v1.5.0) (2025-01-09)
|
|
4
26
|
|
|
5
27
|
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
- **[Team](#team)**
|
|
10
10
|
- **[License](#license)**
|
|
11
11
|
|
|
12
|
-
## Current Node-API version: 9
|
|
13
|
-
|
|
14
|
-
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
|
|
15
|
-
|
|
16
12
|
<a name="introduction"></a>
|
|
17
13
|
|
|
18
14
|
## Introduction
|
|
@@ -45,8 +41,8 @@ npm i node-api-headers
|
|
|
45
41
|
|
|
46
42
|
## Versions
|
|
47
43
|
|
|
48
|
-
Node-API C headers are backward-compatible. Its version (e.g. `8`) is released
|
|
49
|
-
separately from the Node.js version stream (e.g. `19.8.1`) and changes are
|
|
44
|
+
Node-API C headers are backward-compatible. Its version (e.g. `8`) is released
|
|
45
|
+
separately from the Node.js version stream (e.g. `19.8.1`) and changes are
|
|
50
46
|
backported to active Node.js LTS lines (e.g. `16.x` and `18.x`).
|
|
51
47
|
|
|
52
48
|
This package publishes semver-minor versions with new Node-API C headers changes.
|
|
@@ -57,6 +53,7 @@ JS API breaking changes are published with new semver-major versions.
|
|
|
57
53
|
## API
|
|
58
54
|
|
|
59
55
|
The module exports two properties `include_dir` and `symbols`.
|
|
56
|
+
|
|
60
57
|
### `include_dir`
|
|
61
58
|
|
|
62
59
|
This property is a string that represents the include path for the Node-API
|
|
@@ -89,18 +86,10 @@ grouped by version and api types.
|
|
|
89
86
|
|
|
90
87
|
## Team members
|
|
91
88
|
|
|
92
|
-
|
|
93
|
-
| Name | GitHub Link |
|
|
94
|
-
| ------------------- | ----------------------------------------------------- |
|
|
95
|
-
| Anna Henningsen | [addaleax](https://github.com/addaleax) |
|
|
96
|
-
| Chengzhong Wu | [legendecas](https://github.com/legendecas) |
|
|
97
|
-
| Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
|
|
98
|
-
| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
|
|
99
|
-
| Jim Schlight | [jschlight](https://github.com/jschlight) |
|
|
100
|
-
| Michael Dawson | [mhdawson](https://github.com/mhdawson) |
|
|
101
|
-
| Kevin Eady | [KevinEady](https://github.com/KevinEady)
|
|
102
|
-
| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
|
|
89
|
+
The project is maintained by the [Node-API team members](https://github.com/nodejs/abi-stable-node/?tab=readme-ov-file#project-participants).
|
|
103
90
|
|
|
104
91
|
<a name="license"></a>
|
|
105
92
|
|
|
93
|
+
## License
|
|
94
|
+
|
|
106
95
|
Licensed under [MIT](./LICENSE.md)
|
|
@@ -5,18 +5,6 @@
|
|
|
5
5
|
#include <stdbool.h> // NOLINT(modernize-deprecated-headers)
|
|
6
6
|
#include <stddef.h> // NOLINT(modernize-deprecated-headers)
|
|
7
7
|
|
|
8
|
-
// Use INT_MAX, this should only be consumed by the pre-processor anyway.
|
|
9
|
-
#define NAPI_VERSION_EXPERIMENTAL 2147483647
|
|
10
|
-
#ifndef NAPI_VERSION
|
|
11
|
-
// The baseline version for N-API.
|
|
12
|
-
// The NAPI_VERSION controls which version will be used by default when
|
|
13
|
-
// compilling a native addon. If the addon developer specifically wants to use
|
|
14
|
-
// functions available in a new version of N-API that is not yet ported in all
|
|
15
|
-
// LTS versions, they can set NAPI_VERSION knowing that they have specifically
|
|
16
|
-
// depended on that version.
|
|
17
|
-
#define NAPI_VERSION 8
|
|
18
|
-
#endif
|
|
19
|
-
|
|
20
8
|
#include "js_native_api_types.h"
|
|
21
9
|
|
|
22
10
|
// If you need __declspec(dllimport), either include <node_api.h> instead, or
|
|
@@ -62,6 +50,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_get_boolean(napi_env env,
|
|
|
62
50
|
// Methods to create Primitive types/Objects
|
|
63
51
|
NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env,
|
|
64
52
|
napi_value* result);
|
|
53
|
+
|
|
65
54
|
NAPI_EXTERN napi_status NAPI_CDECL napi_create_array(napi_env env,
|
|
66
55
|
napi_value* result);
|
|
67
56
|
NAPI_EXTERN napi_status NAPI_CDECL
|
|
@@ -348,7 +337,7 @@ napi_create_reference(napi_env env,
|
|
|
348
337
|
|
|
349
338
|
// Deletes a reference. The referenced value is released, and may
|
|
350
339
|
// be GC'd unless there are other references to it.
|
|
351
|
-
NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(
|
|
340
|
+
NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(node_api_basic_env env,
|
|
352
341
|
napi_ref ref);
|
|
353
342
|
|
|
354
343
|
// Increments the reference count, optionally returning the resulting count.
|
|
@@ -470,6 +459,7 @@ napi_get_dataview_info(napi_env env,
|
|
|
470
459
|
napi_value* arraybuffer,
|
|
471
460
|
size_t* byte_offset);
|
|
472
461
|
|
|
462
|
+
|
|
473
463
|
// version management
|
|
474
464
|
NAPI_EXTERN napi_status NAPI_CDECL napi_get_version(node_api_basic_env env,
|
|
475
465
|
uint32_t* result);
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
#ifndef SRC_JS_NATIVE_API_TYPES_H_
|
|
2
2
|
#define SRC_JS_NATIVE_API_TYPES_H_
|
|
3
3
|
|
|
4
|
+
// Use INT_MAX, this should only be consumed by the pre-processor anyway.
|
|
5
|
+
#define NAPI_VERSION_EXPERIMENTAL 2147483647
|
|
6
|
+
#ifndef NAPI_VERSION
|
|
7
|
+
// The baseline version for N-API.
|
|
8
|
+
// The NAPI_VERSION controls which version will be used by default when
|
|
9
|
+
// compilling a native addon. If the addon developer specifically wants to use
|
|
10
|
+
// functions available in a new version of N-API that is not yet ported in all
|
|
11
|
+
// LTS versions, they can set NAPI_VERSION knowing that they have specifically
|
|
12
|
+
// depended on that version.
|
|
13
|
+
#define NAPI_VERSION 8
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
// This file needs to be compatible with C compilers.
|
|
5
18
|
// This is a public include file, and these includes have essentially
|
|
6
19
|
// became part of it's API.
|
|
@@ -98,6 +111,8 @@ typedef enum {
|
|
|
98
111
|
napi_float64_array,
|
|
99
112
|
napi_bigint64_array,
|
|
100
113
|
napi_biguint64_array,
|
|
114
|
+
#define NODE_API_HAS_FLOAT16_ARRAY
|
|
115
|
+
napi_float16_array,
|
|
101
116
|
} napi_typedarray_type;
|
|
102
117
|
|
|
103
118
|
typedef enum {
|
|
@@ -33,10 +33,6 @@ struct uv_loop_s; // Forward declaration.
|
|
|
33
33
|
#define NAPI_NO_RETURN
|
|
34
34
|
#endif
|
|
35
35
|
|
|
36
|
-
typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
|
|
37
|
-
napi_value exports);
|
|
38
|
-
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);
|
|
39
|
-
|
|
40
36
|
// Used by deprecated registration method napi_module_register.
|
|
41
37
|
typedef struct napi_module {
|
|
42
38
|
int nm_version;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
#include "js_native_api_types.h"
|
|
5
5
|
|
|
6
|
+
typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
|
|
7
|
+
napi_value exports);
|
|
8
|
+
// False positive: https://github.com/cpplint/cpplint/issues/409
|
|
9
|
+
// NOLINTNEXTLINE (readability/casting)
|
|
10
|
+
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);
|
|
11
|
+
|
|
6
12
|
typedef struct napi_callback_scope__* napi_callback_scope;
|
|
7
13
|
typedef struct napi_async_context__* napi_async_context;
|
|
8
14
|
typedef struct napi_async_work__* napi_async_work;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to
|
|
5
|
+
* deal in the Software without restriction, including without limitation the
|
|
6
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
19
|
+
* IN THE SOFTWARE.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
#ifndef UV_AIX_H
|
|
23
|
+
#define UV_AIX_H
|
|
24
|
+
|
|
25
|
+
#define UV_PLATFORM_LOOP_FIELDS \
|
|
26
|
+
int fs_fd; \
|
|
27
|
+
|
|
28
|
+
#define UV_PLATFORM_FS_EVENT_FIELDS \
|
|
29
|
+
uv__io_t event_watcher; \
|
|
30
|
+
char *dir_filename; \
|
|
31
|
+
|
|
32
|
+
#endif /* UV_AIX_H */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to
|
|
5
|
+
* deal in the Software without restriction, including without limitation the
|
|
6
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
19
|
+
* IN THE SOFTWARE.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
#ifndef UV_BSD_H
|
|
23
|
+
#define UV_BSD_H
|
|
24
|
+
|
|
25
|
+
#define UV_PLATFORM_FS_EVENT_FIELDS \
|
|
26
|
+
uv__io_t event_watcher; \
|
|
27
|
+
|
|
28
|
+
#define UV_IO_PRIVATE_PLATFORM_FIELDS \
|
|
29
|
+
int rcount; \
|
|
30
|
+
int wcount; \
|
|
31
|
+
|
|
32
|
+
#define UV_HAVE_KQUEUE 1
|
|
33
|
+
|
|
34
|
+
#endif /* UV_BSD_H */
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
* of this software and associated documentation files (the "Software"), to
|
|
5
|
+
* deal in the Software without restriction, including without limitation the
|
|
6
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
7
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
* furnished to do so, subject to the following conditions:
|
|
9
|
+
*
|
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
|
11
|
+
* all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
19
|
+
* IN THE SOFTWARE.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
#ifndef UV_DARWIN_H
|
|
23
|
+
#define UV_DARWIN_H
|
|
24
|
+
|
|
25
|
+
#if defined(__APPLE__) && defined(__MACH__)
|
|
26
|
+
# include <mach/mach.h>
|
|
27
|
+
# include <mach/task.h>
|
|
28
|
+
# include <mach/semaphore.h>
|
|
29
|
+
# include <TargetConditionals.h>
|
|
30
|
+
# define UV_PLATFORM_SEM_T semaphore_t
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#define UV_IO_PRIVATE_PLATFORM_FIELDS \
|
|
34
|
+
int rcount; \
|
|
35
|
+
int wcount; \
|
|
36
|
+
|
|
37
|
+
#define UV_PLATFORM_LOOP_FIELDS \
|
|
38
|
+
uv_thread_t cf_thread; \
|
|
39
|
+
void* _cf_reserved; \
|
|
40
|
+
void* cf_state; \
|
|
41
|
+
uv_mutex_t cf_mutex; \
|
|
42
|
+
uv_sem_t cf_sem; \
|
|
43
|
+
struct uv__queue cf_signals; \
|
|
44
|
+
|
|
45
|
+
#define UV_PLATFORM_FS_EVENT_FIELDS \
|
|
46
|
+
uv__io_t event_watcher; \
|
|
47
|
+
char* realpath; \
|
|
48
|
+
int realpath_len; \
|
|
49
|
+
int cf_flags; \
|
|
50
|
+
uv_async_t* cf_cb; \
|
|
51
|
+
struct uv__queue cf_events; \
|
|
52
|
+
struct uv__queue cf_member; \
|
|
53
|
+
int cf_error; \
|
|
54
|
+
uv_mutex_t cf_mutex; \
|
|
55
|
+
|
|
56
|
+
#define UV_STREAM_PRIVATE_PLATFORM_FIELDS \
|
|
57
|
+
void* select; \
|
|
58
|
+
|
|
59
|
+
#define UV_HAVE_KQUEUE 1
|
|
60
|
+
|
|
61
|
+
#endif /* UV_DARWIN_H */
|