From e5f57b766121519a04cde0ffb9b13b5cd7203478 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Fri, 10 Mar 2017 22:48:23 +0100 Subject: [PATCH] move #undef min/max to v8js_v8.h --- v8js_class.cc | 5 ----- v8js_convert.cc | 5 ----- v8js_v8.h | 6 ++++++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/v8js_class.cc b/v8js_class.cc index 5dc2171..7f963ed 100644 --- a/v8js_class.cc +++ b/v8js_class.cc @@ -36,11 +36,6 @@ extern "C" { #include "zend_exceptions.h" } -/* On Windows there are max and min macros, which would clobber the - * method names of std::numeric_limits< > otherwise. */ -#undef max -#undef min - #define PHP_V8JS_SCRIPT_RES_NAME "V8Js script" /* {{{ Class Entries */ diff --git a/v8js_convert.cc b/v8js_convert.cc index a4a47f2..02c862a 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -34,11 +34,6 @@ extern "C" { #include "zend_exceptions.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) /* {{{ */ { zend_string *key; diff --git a/v8js_v8.h b/v8js_v8.h index 555dae3..646eac5 100644 --- a/v8js_v8.h +++ b/v8js_v8.h @@ -36,6 +36,12 @@ #define V8JS_GLOBAL(isolate) ((isolate)->GetCurrentContext()->Global()) +/* On Windows there are max and min macros, which would clobber the + * method names of std::numeric_limits< > otherwise. */ +#undef max +#undef min + + /* Extracts a C string from a V8 Utf8Value. */ static inline const char * ToCString(const v8::String::Utf8Value &value) /* {{{ */ {