Skip to content

Commit

Permalink
doc: mark NAPI_AUTO_LENGTH as code
Browse files Browse the repository at this point in the history
PR-URL: #18697
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
tniessen authored and MylesBorins committed Feb 21, 2018
1 parent 72d7159 commit b5073a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ NAPI_NO_RETURN void napi_fatal_error(const char* location,

- `[in] location`: Optional location at which the error occurred.
- `[in] location_len`: The length of the location in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[in] message`: The message associated with the error.
- `[in] message_len`: The length of the message in bytes, or
NAPI_AUTO_LENGTH if it is
`NAPI_AUTO_LENGTH` if it is
null-terminated.

The function call does not return, the process will be terminated.
Expand Down Expand Up @@ -1255,7 +1255,7 @@ napi_status napi_create_function(napi_env env,
- `[in] utf8name`: A string representing the name of the function encoded as
UTF8.
- `[in] length`: The length of the utf8name in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[in] cb`: A function pointer to the native function to be invoked when the
created function is invoked from JavaScript.
- `[in] data`: Optional arbitrary context data to be passed into the native
Expand Down Expand Up @@ -1483,7 +1483,7 @@ napi_status napi_create_string_latin1(napi_env env,
- `[in] env`: The environment that the API is invoked under.
- `[in] str`: Character buffer representing a ISO-8859-1-encoded string.
- `[in] length`: The length of the string in bytes, or
NAPI_AUTO_LENGTH if it is null-terminated.
`NAPI_AUTO_LENGTH` if it is null-terminated.
- `[out] result`: A `napi_value` representing a JavaScript String.

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

Returns `napi_ok` if the API succeeded.
Expand All @@ -1530,7 +1530,7 @@ napi_status napi_create_string_utf8(napi_env env,

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

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

0 comments on commit b5073a0

Please sign in to comment.