You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sgerace opened this issue
Oct 2, 2015
· 6 comments
Labels
bufferIssues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.questionIssues that look for answers.
I'm writing a node addon and I was just curious if there was a reason why all of the call in node::Buffer accept and return char * instead of the (arguably) more representative unsigned char *. I'm analyzing buffers as they are passed into my function, so it is certainly trivial for me to do:
I was just wondering if there was a specific reason why char * was chosen since buffers (by definition) are intended to contain binary data.
The text was updated successfully, but these errors were encountered:
mscdex
added
question
Issues that look for answers.
buffer
Issues and PRs related to the buffer subsystem.
c++
Issues and PRs that require attention from people who are familiar with C++.
labels
Oct 2, 2015
@bnoordhuis Would we consider changing the native API again, or is this something we'll be leaving alone? char* may have been chosen to work most easily with the V8 API at the time, but that isn't so much the case now.
Personally I'd say we leave it as is unless there's a compelling reason to change it.
bufferIssues and PRs related to the buffer subsystem.c++Issues and PRs that require attention from people who are familiar with C++.questionIssues that look for answers.
I'm writing a node addon and I was just curious if there was a reason why all of the call in
node::Buffer
accept and returnchar *
instead of the (arguably) more representativeunsigned char *
. I'm analyzing buffers as they are passed into my function, so it is certainly trivial for me to do:I was just wondering if there was a specific reason why
char *
was chosen since buffers (by definition) are intended to contain binary data.The text was updated successfully, but these errors were encountered: