Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
build: lint benchmark addon
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#16160
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information
bnoordhuis authored and addaleax committed Oct 15, 2017
1 parent 2a0c522 commit 63f38d9
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 @@ -968,6 +968,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 63f38d9

Please sign in to comment.