Skip to content

[N-API] napi_get_value_string_length return length as type too small #13458

Description

@dead-claudia

As specified in the N-API documentation, napi_get_value_string_length returns the string length as an int, but the JS spec mandates it to be an unsigned integer at most 253-1. It may be more appropriate here to return a uint64_t instead.

(BTW, I use "return" loosely, in reference to its out parameter.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.node-apiIssues and PRs related to Node-API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions