diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-29 00:46:45 +0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-11-30 20:14:24 -0800 |
commit | 3d668262a09ef031003babc14eff9e5d4ac81698 (patch) | |
tree | 90206d42148b96c3a60429315e0cd5f39140446c /src/node_api.cc | |
parent | 976065d9cb88a118c0238a8518a2570b28cce817 (diff) | |
download | android-node-v8-3d668262a09ef031003babc14eff9e5d4ac81698.tar.gz android-node-v8-3d668262a09ef031003babc14eff9e5d4ac81698.tar.bz2 android-node-v8-3d668262a09ef031003babc14eff9e5d4ac81698.zip |
src: move C++ binding/addon related code into node_binding{.h, .cc}
This patch:
- Moves the C++ binding/addon related code out of
node_internals.h/node.cc and into dedicated files
node_binding.h/node_binding.cc, and only puts the code resued
by other files into the header.
- Introduce a node::binding namespace so that code exposed to
other files can be easily recognized.
PR-URL: https://github.com/nodejs/node/pull/24701
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r-- | src/node_api.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_api.cc b/src/node_api.cc index 20428d40fa..7d843c08f5 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -1,10 +1,11 @@ #include <node_buffer.h> #include "env.h" #define NAPI_EXPERIMENTAL +#include "js_native_api_v8.h" #include "node_api.h" +#include "node_binding.h" #include "node_errors.h" #include "node_internals.h" -#include "js_native_api_v8.h" struct node_napi_env__ : public napi_env__ { explicit node_napi_env__(v8::Local<v8::Context> context): |