Content-Length: 270409 | pFad | https://github.com/nodejs/node/commit/114a3e5a05

71 doc: fix c++ addon hello world sample · nodejs/node@114a3e5 · GitHub
Skip to content

Commit 114a3e5

Browse files
geeksilva97aduh95
authored andcommitted
doc: fix c++ addon hello world sample
PR-URL: #56172 Refs: #56173 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: theanarkh <theratliter@gmail.com>
1 parent 28a4b6f commit 114a3e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/addons.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ namespace demo {
7272
using v8::FunctionCallbackInfo;
7373
using v8::Isolate;
7474
using v8::Local;
75+
using v8::NewStringType;
7576
using v8::Object;
7677
using v8::String;
7778
using v8::Value;
7879

7980
void Method(const FunctionCallbackInfo<Value>& args) {
8081
Isolate* isolate = args.GetIsolate();
8182
args.GetReturnValue().Set(String::NewFromUtf8(
82-
isolate, "world").ToLocalChecked());
83+
isolate, "world", NewStringType::kNormal).ToLocalChecked());
8384
}
8485

8586
void Initialize(Local<Object> exports) {

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/nodejs/node/commit/114a3e5a05

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy