doc: fix return results description of napi_get_value_string_utf8#14529
doc: fix return results description of napi_get_value_string_utf8#14529taveras wants to merge 5 commits intonodejs:masterfrom taveras:doc-n-api-get-value-results
Conversation
doc/api/n-api.md
Outdated
There was a problem hiding this comment.
If the buffer size is insufficient, the string will be truncated including a null terminator.
I feel like this information should be represented somewhere, maybe as part of the bufsize parameter?
There was a problem hiding this comment.
ah, yes! do you feel it may be best to keep this sentence within the [out] result description?
There was a problem hiding this comment.
I think it would be better to move that sentence to be part of the [in] bufsize parameter comment. That's where it's relevant to call out that the string will be truncated, but still include a null terminator.
kfarnung
left a comment
There was a problem hiding this comment.
I think it's good to call out the possible truncation for inadequate buffer sizes. I don't think it belongs where it was though.
doc/api/n-api.md
Outdated
There was a problem hiding this comment.
@kfarnung I added the details about the string truncation, but now under the bufsize line
There was a problem hiding this comment.
nit: needs a line wrap at 80 chars :-)
|
@taveras seems like there are now conflicts, can you rebase ? |
|
@mhdawson i rebased the branch against master. also, i added the same changes for the remaining |
|
@taveras thanks :) CI run: https://ci.nodejs.org/job/node-test-pull-request/9792/ |
|
CI failure was unrelated, opened #14982 |
|
Landing, sorry it took so long. |
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: #14529 Fixes: #14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: nodejs/node#14529 Fixes: nodejs/node#14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: nodejs/node#14529 Fixes: nodejs/node#14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: #14529 Fixes: #14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: #14529 Fixes: #14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. PR-URL: nodejs#14529 Fixes: nodejs#14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been previously changed. This improves the doc reflect the current design. Backport-PR-URL: #19447 PR-URL: #14529 Fixes: #14398 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
The API for napi_get_value_string_utf8() appears to have been
previously changed. This improves the doc reflect the current design.
Fixes: #14398
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
doc, n-api