Skip to content

Commit 8826f18

Browse files
tniessenMylesBorins
authored andcommitted
doc: mark NAPI_AUTO_LENGTH as code
Backport-PR-URL: #19447 PR-URL: #18697 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent e9e5d56 commit 8826f18

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/api/n-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ NAPI_NO_RETURN void napi_fatal_error(const char* location,
552552

553553
- `[in] location`: Optional location at which the error occurred.
554554
- `[in] location_len`: The length of the location in bytes, or
555-
NAPI_AUTO_LENGTH if it is null-terminated.
555+
`NAPI_AUTO_LENGTH` if it is null-terminated.
556556
- `[in] message`: The message associated with the error.
557557
- `[in] message_len`: The length of the message in bytes, or
558-
NAPI_AUTO_LENGTH if it is
558+
`NAPI_AUTO_LENGTH` if it is
559559
null-terminated.
560560

561561
The function call does not return, the process will be terminated.
@@ -1258,7 +1258,7 @@ napi_status napi_create_function(napi_env env,
12581258
- `[in] utf8name`: A string representing the name of the function encoded as
12591259
UTF8.
12601260
- `[in] length`: The length of the utf8name in bytes, or
1261-
NAPI_AUTO_LENGTH if it is null-terminated.
1261+
`NAPI_AUTO_LENGTH` if it is null-terminated.
12621262
- `[in] cb`: A function pointer to the native function to be invoked when the
12631263
created function is invoked from JavaScript.
12641264
- `[in] data`: Optional arbitrary context data to be passed into the native
@@ -1491,7 +1491,7 @@ napi_status napi_create_string_latin1(napi_env env,
14911491
- `[in] env`: The environment that the API is invoked under.
14921492
- `[in] str`: Character buffer representing a ISO-8859-1-encoded string.
14931493
- `[in] length`: The length of the string in bytes, or
1494-
NAPI_AUTO_LENGTH if it is null-terminated.
1494+
`NAPI_AUTO_LENGTH` if it is null-terminated.
14951495
- `[out] result`: A `napi_value` representing a JavaScript String.
14961496

14971497
Returns `napi_ok` if the API succeeded.
@@ -1516,7 +1516,7 @@ napi_status napi_create_string_utf16(napi_env env,
15161516
- `[in] env`: The environment that the API is invoked under.
15171517
- `[in] str`: Character buffer representing a UTF16-LE-encoded string.
15181518
- `[in] length`: The length of the string in two-byte code units, or
1519-
NAPI_AUTO_LENGTH if it is null-terminated.
1519+
`NAPI_AUTO_LENGTH` if it is null-terminated.
15201520
- `[out] result`: A `napi_value` representing a JavaScript String.
15211521

15221522
Returns `napi_ok` if the API succeeded.
@@ -1540,7 +1540,7 @@ napi_status napi_create_string_utf8(napi_env env,
15401540

15411541
- `[in] env`: The environment that the API is invoked under.
15421542
- `[in] str`: Character buffer representing a UTF8-encoded string.
1543-
- `[in] length`: The length of the string in bytes, or NAPI_AUTO_LENGTH
1543+
- `[in] length`: The length of the string in bytes, or `NAPI_AUTO_LENGTH`
15441544
if it is null-terminated.
15451545
- `[out] result`: A `napi_value` representing a JavaScript String.
15461546

@@ -3066,7 +3066,7 @@ napi_status napi_define_class(napi_env env,
30663066
- `[in] utf8name`: Name of the JavaScript constructor function; this is
30673067
not required to be the same as the C++ class name, though it is recommended
30683068
for clarity.
3069-
- `[in] length`: The length of the utf8name in bytes, or NAPI_AUTO_LENGTH
3069+
- `[in] length`: The length of the utf8name in bytes, or `NAPI_AUTO_LENGTH`
30703070
if it is null-terminated.
30713071
- `[in] constructor`: Callback function that handles constructing instances
30723072
of the class. (This should be a static method on the class, not an actual

0 commit comments

Comments
 (0)