summaryrefslogtreecommitdiff
path: root/src/node_api.cc
diff options
context:
space:
mode:
authorlegendecas <legendecas@gmail.com>2022-08-25 08:15:00 +0800
committerlegendecas <legendecas@gmail.com>2022-08-25 08:15:00 +0800
commitf33a038384b7d1a87cc421d70256243871b0b774 (patch)
tree43c3ff867bbabbbe2a0861bce1a0dbdf0ee70fcb /src/node_api.cc
parentf9cf4b6490a458e2827b059498c29cbe46a492a5 (diff)
downloadnode-new-f33a038384b7d1a87cc421d70256243871b0b774.tar.gz
node-api: cleanup redundant static modifiers
Functions declared in anonymous namespaces are not necessarily to be marked as static. PR-URL: https://github.com/nodejs/node/pull/44301 Refs: https://github.com/nodejs/node/pull/44141 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index 08352b0a58..dfe27f4373 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -16,6 +16,7 @@
#include "util-inl.h"
#include <atomic>
+#include <cstring>
#include <memory>
node_napi_env__::node_napi_env__(v8::Local<v8::Context> context,
@@ -124,8 +125,8 @@ class BufferFinalizer : private Finalizer {
};
};
-static inline napi_env NewEnv(v8::Local<v8::Context> context,
- const std::string& module_filename) {
+inline napi_env NewEnv(v8::Local<v8::Context> context,
+ const std::string& module_filename) {
node_napi_env result;
result = new node_napi_env__(context, module_filename);