Commit 7d2bc52
committed
src: include
Including `node.h` should not result in all of Node-API also being
available to callers. Users who want `node_api.h` contents should
explicitly include that header.
We currently include it specifically for `napi_addon_register_func`;
by moving that into `node_api_types.h` and including that instead,
we can reduce unintentionally included API surface a lot.
Refs: #60345 (comment)
PR-URL: #60496
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>node_api_types.h instead of node_api.h in node.h
1 parent 36c082b commit 7d2bc52Copy full SHA for 7d2bc52
1 file changed
+2-1Lines changed: 2 additions & 1 deletion
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
76 | 76 | |
77 | 77 | |
78 | 78 | |
79 | | - |
| 79 | + |
80 | 80 | |
81 | 81 | |
82 | 82 | |
| ||
124 | 124 | |
125 | 125 | |
126 | 126 | |
| 127 | + |
127 | 128 | |
128 | 129 | |
129 | 130 | |
|
0 commit comments