mirror of https://github.com/lukechilds/node.git
Browse Source
PR-URL: https://github.com/nodejs/node/pull/16160 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>v9.x-staging
Ben Noordhuis
7 years ago
committed by
Joyee Cheung
2 changed files with 4 additions and 6 deletions
@ -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) |
|||
|
Loading…
Reference in new issue