Skip to content

Conversation

mhdawson
Copy link
Member

  • Add doc for napi_create_string_latin1().
  • Fix signatures where c string was specified instead of napi_value.
  • Fix return type of napi_callback.
  • Update to specify that napi_escape_handle() can only be called once
    for a given scope.

Fixes: #13555
Fixes: #13556
Fixes: #13562

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows [commit guidelines]
Affected core subsystem(s)

doc, n-api

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API. labels Jun 13, 2017
doc/api/n-api.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already fixed in #13570. You'll need to rebase.

doc/api/n-api.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once per scope ?

doc/api/n-api.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed - this should say length in bytes, not characters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fix the doc for the length parameter of napi_create_string_utf16. That length is in two-byte code units, not characters. (GitHub won't let me put a comment on that line.)

doc/api/n-api.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Length in bytes. While in the case of Latin1 a character is always one byte, I think bytes is clearer in case someone is not familiar with the encoding.

Copy link
Member

@jasongin jasongin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments.

doc/api/n-api.md Outdated
Copy link
Member

@RReverser RReverser Jun 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "references"

doc/api/n-api.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same typo.

mhdawson added 2 commits June 15, 2017 01:55
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

Fixes: nodejs#13555
Fixes: nodejs#13556
Fixes: nodejs#13562
@mhdawson
Copy link
Member Author

@jasongin, @RReverser thanks for the comments. Rebased and pushed commit to address.

@RReverser RReverser self-requested a review June 15, 2017 10:52
@mhdawson
Copy link
Member Author

@mhdawson
Copy link
Member Author

CI run looks ok. Arm failure was unrelated, a problem doing checkout. Going to land.

@mhdawson
Copy link
Member Author

Landed as 62e940d

@mhdawson mhdawson closed this Jun 16, 2017
mhdawson added a commit that referenced this pull request Jun 16, 2017
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: #13650
Fixes: #13555
Fixes: #13556
Fixes: #13562
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
Reviewed-By: Ingvar Stepanyan <[email protected]>
addaleax pushed a commit that referenced this pull request Jun 17, 2017
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: #13650
Fixes: #13555
Fixes: #13556
Fixes: #13562
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
Reviewed-By: Ingvar Stepanyan <[email protected]>
@addaleax addaleax mentioned this pull request Jun 17, 2017
addaleax pushed a commit that referenced this pull request Jun 21, 2017
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: #13650
Fixes: #13555
Fixes: #13556
Fixes: #13562
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
Reviewed-By: Ingvar Stepanyan <[email protected]>
@addaleax addaleax mentioned this pull request Jun 21, 2017
@mhdawson mhdawson deleted the napi-doc20 branch June 28, 2017 19:23
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Apr 10, 2018
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

PR-URL: nodejs#13650
Fixes: nodejs#13555
Fixes: nodejs#13556
Fixes: nodejs#13562
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
Reviewed-By: Ingvar Stepanyan <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 16, 2018
- Add doc for napi_create_string_latin1().
- Fix signatures where c string was specified instead of napi_value.
- Fix return type of napi_callback.
- Update to specify that napi_escape_handle() can only be called once
  for a given scope.

Backport-PR-URL: #19447
PR-URL: #13650
Fixes: #13555
Fixes: #13556
Fixes: #13562
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
Reviewed-By: Ingvar Stepanyan <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants