Skip to content

Commit

Permalink
fix long vs. zend_long issue on Windows, refs phpv8#292
Browse files Browse the repository at this point in the history
  • Loading branch information
stesie committed Mar 8, 2017
1 parent a9bdc32 commit e86c957
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v8js_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static v8::Handle<v8::Value> v8js_hash_to_jsarr(zval *value, v8::Isolate *isolat
v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC) /* {{{ */
{
v8::Handle<v8::Value> jsValue;
long v;
zend_long v;
zend_class_entry *ce;

switch (Z_TYPE_P(value))
Expand Down Expand Up @@ -143,9 +143,9 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
#undef max
#undef min
if (v < - std::numeric_limits<int32_t>::min() || v > std::numeric_limits<int32_t>::max()) {
jsValue = V8JS_FLOAT((double)v);
jsValue = V8JS_FLOAT(static_cast<double>(v));
} else {
jsValue = V8JS_INT(v);
jsValue = V8JS_INT(static_cast<int32_t>(v));
}
break;

Expand Down

0 comments on commit e86c957

Please sign in to comment.