1 Star 0 Fork 14

niuzj0/node-gyp

forked from openEuler-RISC-V/node-gyp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
node-gyp-update-test.patch 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangyangdahai 提交于 2022-03-16 19:58 . update test code for nodejs v16
node-gyp/commit/e6699d13cdcd6abe543b250f4297808912a4a188
diff -Nur a/test/node_modules/hello_world/hello.cc b/test/node_modules/hello_world/hello.cc
--- a/test/node_modules/hello_world/hello.cc 2017-03-16 04:25:31.000000000 +0800
+++ b/test/node_modules/hello_world/hello.cc 2022-03-16 19:53:46.935767424 +0800
@@ -1,12 +1,11 @@
#include <nan.h>
-void Method(const Nan::FunctionCallbackInfo<v8::Value>& info) {
+NAN_METHOD(Method) {
info.GetReturnValue().Set(Nan::New("world").ToLocalChecked());
}
-void Init(v8::Local<v8::Object> exports) {
- exports->Set(Nan::New("hello").ToLocalChecked(),
- Nan::New<v8::FunctionTemplate>(Method)->GetFunction());
+NAN_MODULE_INIT(Init) {
+ Nan::SetMethod(target, "hello", Method);
}
NODE_MODULE(hello, Init)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/niuzj0/node-gyp.git
[email protected]:niuzj0/node-gyp.git
niuzj0
node-gyp
node-gyp
master

搜索帮助