Skip to content

Commit ea0fec2

Browse files
bnoordhuistargos
authored andcommitted
build: lint benchmark addon
PR-URL: #16160 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent c032b5f commit ea0fec2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ LINT_CPP_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/
965965
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h
966966

967967
LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
968+
benchmark/misc/function_call/binding.cc \
968969
src/*.c \
969970
src/*.cc \
970971
src/*.h \
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
#include <v8.h>
22
#include <node.h>
33

4-
using namespace v8;
5-
64
static int c = 0;
75

8-
void Hello(const FunctionCallbackInfo<Value>& args) {
6+
void Hello(const v8::FunctionCallbackInfo<v8::Value>& args) {
97
args.GetReturnValue().Set(c++);
108
}
119

12-
extern "C" void init (Local<Object> target) {
13-
HandleScope scope(Isolate::GetCurrent());
10+
void Initialize(v8::Local<v8::Object> target) {
1411
NODE_SET_METHOD(target, "hello", Hello);
1512
}
1613

17-
NODE_MODULE(NODE_GYP_MODULE_NAME, init)
14+
NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize)

0 commit comments

Comments
 (0)