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
Aaron Jacobs 2012-10-23 16:43:51 +11:00 committed by Ben Noordhuis
parent 9fa953d3e7
commit 49f0f618a9
1 changed files with 4 additions and 4 deletions

View File

@ -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) {