mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
build: lint benchmark addon
PR-URL: https://github.com/nodejs/node/pull/16160 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
committed by
Joyee Cheung
parent
4157342744
commit
411695e1d2
1
Makefile
1
Makefile
@@ -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 \
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user