GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — node-api: explicitly set __cdecl for API functions · styfle/node@fb74474

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • js_native_api.h
    • js_native_api_types.h
    • js_native_api_v8.cc
    • node_api.cc
    • node_api.h
    • node_api_types.h
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/js_native_api.h‎

Copy file name to clipboardExpand all lines: src/js_native_api.h
+367-363Lines changed: 367 additions & 363 deletions
Large diffs are not rendered by default.
Collapse file

‎src/js_native_api_types.h‎

Copy file name to clipboardExpand all lines: src/js_native_api_types.h
+13-4Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111
typedef uint16_t char16_t;
1212
#endif
1313

14+
#ifndef NAPI_CDECL
15+
#ifdef _WIN32
16+
#define NAPI_CDECL __cdecl
17+
#else
18+
#define NAPI_CDECL
19+
#endif
20+
#endif
21+
1422
// JSVM API types are all opaque pointers for ABI stability
1523
// typedef undefined structs instead of void* for compile time type safety
1624
typedef struct napi_env__* napi_env;
@@ -100,10 +108,11 @@ typedef enum {
100108
// * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
101109
// added value(s).
102110

103-
typedef napi_value (*napi_callback)(napi_env env, napi_callback_info info);
104-
typedef void (*napi_finalize)(napi_env env,
105-
void* finalize_data,
106-
void* finalize_hint);
111+
typedef napi_value(NAPI_CDECL* napi_callback)(napi_env env,
112+
napi_callback_info info);
113+
typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
114+
void* finalize_data,
115+
void* finalize_hint);
107116

108117
typedef struct {
109118
// One of utf8name or name should be NULL.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.