test: make exported method static
The exported method can be static as it will never be called directly. PR-URL: https://github.com/nodejs/node/pull/29102 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
1173199e81
commit
71b5ce5885
@ -1,7 +1,7 @@
|
|||||||
#include <node.h>
|
#include <node.h>
|
||||||
#include <v8.h>
|
#include <v8.h>
|
||||||
|
|
||||||
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
static void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
v8::Isolate* isolate = args.GetIsolate();
|
v8::Isolate* isolate = args.GetIsolate();
|
||||||
args.GetReturnValue().Set(v8::String::NewFromUtf8(
|
args.GetReturnValue().Set(v8::String::NewFromUtf8(
|
||||||
isolate, "world", v8::NewStringType::kNormal).ToLocalChecked());
|
isolate, "world", v8::NewStringType::kNormal).ToLocalChecked());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user