Skip to content

Commit

Permalink
use electron headers from 27.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gregcotten committed Oct 29, 2023
1 parent e86014d commit c80d9de
Show file tree
Hide file tree
Showing 7 changed files with 624 additions and 673 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: ["19.1.0"]
swift-version: ["5.7.1"]
swift-version: ["5.9"]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
777 changes: 389 additions & 388 deletions Sources/NAPIC/include/js_native_api.h

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions Sources/NAPIC/include/js_native_api_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
#include <stdint.h> // NOLINT(modernize-deprecated-headers)

#if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
typedef uint16_t char16_t;
typedef uint16_t char16_t;
#endif

#ifndef NAPI_CDECL
#ifdef _WIN32
#define NAPI_CDECL __cdecl
#else
#define NAPI_CDECL
#endif
#endif

// JSVM API types are all opaque pointers for ABI stability
Expand Down Expand Up @@ -36,9 +44,7 @@ typedef enum {
napi_default_method = napi_writable | napi_configurable,

// Default for object properties, like in JS obj[prop].
napi_default_jsproperty = napi_writable |
napi_enumerable |
napi_configurable,
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable,
#endif // NAPI_VERSION >= 8
} napi_property_attributes;

Expand Down Expand Up @@ -92,7 +98,9 @@ typedef enum {
napi_date_expected,
napi_arraybuffer_expected,
napi_detachable_arraybuffer_expected,
napi_would_deadlock // unused
napi_would_deadlock, // unused
napi_no_external_buffers_allowed,
napi_cannot_run_js,
} napi_status;
// Note: when adding a new enum value to `napi_status`, please also update
// * `const int last_status` in the definition of `napi_get_last_error_info()'
Expand All @@ -102,11 +110,11 @@ typedef enum {
// * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
// added value(s).

typedef napi_value (*napi_callback)(napi_env env,
napi_callback_info info);
typedef void (*napi_finalize)(napi_env env,
void* finalize_data,
void* finalize_hint);
typedef napi_value(NAPI_CDECL* napi_callback)(napi_env env,
napi_callback_info info);
typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
void* finalize_data,
void* finalize_hint);

typedef struct {
// One of utf8name or name should be NULL.
Expand Down
Loading

0 comments on commit c80d9de

Please sign in to comment.