Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-05 22:09:43 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-09 02:29:35 +0300
commitdb2a5b05dfb3634e8fdb965ef5d4c75f73094e9e (patch)
treedf3787238da814aecee2cbeab3973a58c45dbd69 /src/node_binding.h
parent58b00f4cca79ac61864009e3c24194c4bc5c8de2 (diff)
src: add public API for linked bindings
(Re-?)add a public API for creating linked bindings (access to `NM_F_LINKED` as a constant was previously removed in d6ac8a4db0c0a588258f594dc21fbd8018bef7c2), and add a test for the functionality. PR-URL: https://github.com/nodejs/node/pull/26457 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_binding.h')
-rw-r--r--src/node_binding.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node_binding.h b/src/node_binding.h
index fcd7f34ac6a..e2f4d320c80 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -21,6 +21,11 @@ enum {
NM_F_DELETEME = 1 << 3,
};
+// Make sure our internal values match the public API's values.
+static_assert(static_cast<int>(NM_F_LINKED) ==
+ static_cast<int>(node::ModuleFlags::kLinked),
+ "NM_F_LINKED != node::ModuleFlags::kLinked");
+
#define NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, priv, flags) \
static node::node_module _module = { \
NODE_MODULE_VERSION, \