Skip to content

Commit

Permalink
build: lint benchmark addon
Browse files Browse the repository at this point in the history
PR-URL: #16160
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
bnoordhuis authored and targos committed Oct 18, 2017
1 parent c032b5f commit ea0fec2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ LINT_CPP_EXCLUDE += $(wildcard test/addons-napi/??_*/*.cc test/addons-napi/??_*/
LINT_CPP_EXCLUDE += src/tracing/trace_event.h src/tracing/trace_event_common.h

LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
benchmark/misc/function_call/binding.cc \
src/*.c \
src/*.cc \
src/*.h \
Expand Down
9 changes: 3 additions & 6 deletions benchmark/misc/function_call/binding.cc
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#include <v8.h>
#include <node.h>

using namespace v8;

static int c = 0;

void Hello(const FunctionCallbackInfo<Value>& args) {
void Hello(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(c++);
}

extern "C" void init (Local<Object> target) {
HandleScope scope(Isolate::GetCurrent());
void Initialize(v8::Local<v8::Object> target) {
NODE_SET_METHOD(target, "hello", Hello);
}

NODE_MODULE(NODE_GYP_MODULE_NAME, init)
NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize)

0 comments on commit ea0fec2

Please sign in to comment.