mirror of https://github.com/nodejs/node.git
typed arrays: use `signed char` for signed int8s
The C standard allows plain `char` to be unsigned. The build environment at Google trips this issue.v0.8.16-release
parent
9fa953d3e7
commit
49f0f618a9
|
@ -497,7 +497,7 @@ v8::Handle<v8::Value> cTypeToValue(unsigned char val) {
|
|||
}
|
||||
|
||||
template <>
|
||||
v8::Handle<v8::Value> cTypeToValue(char val) {
|
||||
v8::Handle<v8::Value> cTypeToValue(signed char val) {
|
||||
return v8::Integer::New(val);
|
||||
}
|
||||
|
||||
|
@ -543,7 +543,7 @@ unsigned char valueToCType(v8::Handle<v8::Value> value) {
|
|||
}
|
||||
|
||||
template <>
|
||||
char valueToCType(v8::Handle<v8::Value> value) {
|
||||
signed char valueToCType(v8::Handle<v8::Value> value) {
|
||||
return value->Int32Value();
|
||||
}
|
||||
|
||||
|
@ -758,7 +758,7 @@ class DataView {
|
|||
}
|
||||
|
||||
static v8::Handle<v8::Value> getInt8(const v8::Arguments& args) {
|
||||
return getGeneric<char>(args);
|
||||
return getGeneric<signed char>(args);
|
||||
}
|
||||
|
||||
static v8::Handle<v8::Value> getUint16(const v8::Arguments& args) {
|
||||
|
@ -790,7 +790,7 @@ class DataView {
|
|||
}
|
||||
|
||||
static v8::Handle<v8::Value> setInt8(const v8::Arguments& args) {
|
||||
return setGeneric<char>(args);
|
||||
return setGeneric<signed char>(args);
|
||||
}
|
||||
|
||||
static v8::Handle<v8::Value> setUint16(const v8::Arguments& args) {
|
||||
|
|
Loading…
Reference in New Issue