From 49f0f618a92bf27caad000545bc1f460574a7504 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 23 Oct 2012 16:43:51 +1100 Subject: [PATCH] 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. --- src/v8_typed_array.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v8_typed_array.cc b/src/v8_typed_array.cc index 4a76f970598..d1437cdcdf0 100644 --- a/src/v8_typed_array.cc +++ b/src/v8_typed_array.cc @@ -497,7 +497,7 @@ v8::Handle cTypeToValue(unsigned char val) { } template <> -v8::Handle cTypeToValue(char val) { +v8::Handle cTypeToValue(signed char val) { return v8::Integer::New(val); } @@ -543,7 +543,7 @@ unsigned char valueToCType(v8::Handle value) { } template <> -char valueToCType(v8::Handle value) { +signed char valueToCType(v8::Handle value) { return value->Int32Value(); } @@ -758,7 +758,7 @@ class DataView { } static v8::Handle getInt8(const v8::Arguments& args) { - return getGeneric(args); + return getGeneric(args); } static v8::Handle getUint16(const v8::Arguments& args) { @@ -790,7 +790,7 @@ class DataView { } static v8::Handle setInt8(const v8::Arguments& args) { - return setGeneric(args); + return setGeneric(args); } static v8::Handle setUint16(const v8::Arguments& args) {