0
0
mirror of https://github.com/phpv8/v8js.git synced 2025-01-03 16:51:52 +00:00

Undefine min/max macros

This commit is contained in:
Stefan Siegl 2014-11-13 00:58:32 +01:00
parent 0fed780320
commit 5b736a6e92

View File

@ -1093,6 +1093,10 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
case IS_LONG:
v = Z_LVAL_P(value);
/* On Windows there are max and min macros, which would clobber the
* method names of std::numeric_limits< > otherwise. */
#undef max
#undef min
if (v < - std::numeric_limits<int32_t>::min() || v > std::numeric_limits<int32_t>::max()) {
jsValue = V8JS_FLOAT((double)v);
} else {