diff --git a/php_v8js_macros.h b/php_v8js_macros.h index 1e4b966..d68000a 100644 --- a/php_v8js_macros.h +++ b/php_v8js_macros.h @@ -31,7 +31,9 @@ #include extern "C" { +#ifndef _WIN32 #include "php_config.h" +#endif /* work around incompatibilities regarding isnan() and isfinite() macros, * affecting PHP versions before 7.4. */ diff --git a/v8js_convert.cc b/v8js_convert.cc index 9163b41..c3d877a 100644 --- a/v8js_convert.cc +++ b/v8js_convert.cc @@ -85,7 +85,7 @@ static v8::Local v8js_hash_to_jsarr(zval *value, v8::Isolate *isolate if (i > 0) { zval *data; - ulong index = 0; + zend_ulong index = 0; #if PHP_VERSION_ID >= 70300 if (myht && !(GC_FLAGS(myht) & GC_IMMUTABLE)) diff --git a/v8js_methods.cc b/v8js_methods.cc index b8a2e22..63f5fec 100644 --- a/v8js_methods.cc +++ b/v8js_methods.cc @@ -364,7 +364,7 @@ V8JS_METHOD(require) } zval *data; - ulong index = 0; + zend_ulong index = 0; ZEND_HASH_FOREACH_VAL(ht, data) { if (Z_TYPE_P(data) != IS_STRING) { diff --git a/v8js_object_export.cc b/v8js_object_export.cc index 6fee8b2..fa483b5 100644 --- a/v8js_object_export.cc +++ b/v8js_object_export.cc @@ -627,7 +627,7 @@ v8::Local v8js_named_property_callback(v8::Local property_n v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0); v8::String::Utf8Value cstr(isolate, property); const char *name = ToCString(cstr); - uint name_len = cstr.length(); + uint32_t name_len = cstr.length(); char *lower = estrndup(name, name_len); zend_string *method_name;