Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4385b0b

Browse filesBrowse files
addaleaxaduh95
authored andcommitted
src: move napi_addon_register_func to node_api_types.h
This means that `node.h` can include only this file, instead of the entirety of `node_api.h`. Split out from #60496 since it was rightfully pointed out that the breaking part of the change should not touch Node-API headers. PR-URL: #60512 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent de78da7 commit 4385b0b
Copy full SHA for 4385b0b

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎src/node_api.h‎

Copy file name to clipboardExpand all lines: src/node_api.h
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ struct uv_loop_s; // Forward declaration.
3333
#define NAPI_NO_RETURN
3434
#endif
3535

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-
4036
// Used by deprecated registration method napi_module_register.
4137
typedef struct napi_module {
4238
int nm_version;
Collapse file

‎src/node_api_types.h‎

Copy file name to clipboardExpand all lines: src/node_api_types.h
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
#include "js_native_api_types.h"
55

6+
typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
7+
napi_value exports);
8+
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);
9+
610
typedef struct napi_callback_scope__* napi_callback_scope;
711
typedef struct napi_async_context__* napi_async_context;
812
typedef struct napi_async_work__* napi_async_work;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.