Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-api: document that native strings are copied #20425

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ napi_status napi_create_string_latin1(napi_env env,
Returns `napi_ok` if the API succeeded.

This API creates a JavaScript `String` object from a ISO-8859-1-encoded C
string.
string. The native string is copied.

The JavaScript `String` type is described in
[Section 6.1.4][] of the ECMAScript Language Specification.
Expand All @@ -1566,6 +1566,7 @@ napi_status napi_create_string_utf16(napi_env env,
Returns `napi_ok` if the API succeeded.

This API creates a JavaScript `String` object from a UTF16-LE-encoded C string.
The native string is copied.

The JavaScript `String` type is described in
[Section 6.1.4][] of the ECMAScript Language Specification.
Expand All @@ -1590,6 +1591,7 @@ if it is null-terminated.
Returns `napi_ok` if the API succeeded.

This API creates a JavaScript `String` object from a UTF8-encoded C string.
The native string is copied.

The JavaScript `String` type is described in
[Section 6.1.4][] of the ECMAScript Language Specification.
Expand Down