mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 10:21:51 +00:00
move #undef directives to the top of the file
This commit is contained in:
parent
346c47b657
commit
754a663e81
@ -32,6 +32,11 @@ extern "C" {
|
|||||||
#include "zend_closures.h"
|
#include "zend_closures.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* On Windows there are max and min macros, which would clobber the
|
||||||
|
* method names of std::numeric_limits< > otherwise. */
|
||||||
|
#undef max
|
||||||
|
#undef min
|
||||||
|
|
||||||
static int v8js_is_assoc_array(HashTable *myht TSRMLS_DC) /* {{{ */
|
static int v8js_is_assoc_array(HashTable *myht TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
@ -138,10 +143,6 @@ v8::Handle<v8::Value> zval_to_v8js(zval *value, v8::Isolate *isolate TSRMLS_DC)
|
|||||||
|
|
||||||
case IS_LONG:
|
case IS_LONG:
|
||||||
v = Z_LVAL_P(value);
|
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()) {
|
if (v < - std::numeric_limits<int32_t>::min() || v > std::numeric_limits<int32_t>::max()) {
|
||||||
jsValue = V8JS_FLOAT(static_cast<double>(v));
|
jsValue = V8JS_FLOAT(static_cast<double>(v));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user