mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 12:51:52 +00:00
Merge pull request #441 from Jan-E/php74win
make it compile with PHP 7.4 on Windows
This commit is contained in:
commit
a3eab09e96
@ -31,7 +31,9 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#ifndef _WIN32
|
||||||
#include "php_config.h"
|
#include "php_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* work around incompatibilities regarding isnan() and isfinite() macros,
|
/* work around incompatibilities regarding isnan() and isfinite() macros,
|
||||||
* affecting PHP versions before 7.4. */
|
* affecting PHP versions before 7.4. */
|
||||||
|
@ -85,7 +85,7 @@ static v8::Local<v8::Value> v8js_hash_to_jsarr(zval *value, v8::Isolate *isolate
|
|||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
zval *data;
|
zval *data;
|
||||||
ulong index = 0;
|
zend_ulong index = 0;
|
||||||
|
|
||||||
#if PHP_VERSION_ID >= 70300
|
#if PHP_VERSION_ID >= 70300
|
||||||
if (myht && !(GC_FLAGS(myht) & GC_IMMUTABLE))
|
if (myht && !(GC_FLAGS(myht) & GC_IMMUTABLE))
|
||||||
|
@ -364,7 +364,7 @@ V8JS_METHOD(require)
|
|||||||
}
|
}
|
||||||
|
|
||||||
zval *data;
|
zval *data;
|
||||||
ulong index = 0;
|
zend_ulong index = 0;
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_VAL(ht, data) {
|
ZEND_HASH_FOREACH_VAL(ht, data) {
|
||||||
if (Z_TYPE_P(data) != IS_STRING) {
|
if (Z_TYPE_P(data) != IS_STRING) {
|
||||||
|
@ -627,7 +627,7 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::Name> property_n
|
|||||||
v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0);
|
v8js_ctx *ctx = (v8js_ctx *) isolate->GetData(0);
|
||||||
v8::String::Utf8Value cstr(isolate, property);
|
v8::String::Utf8Value cstr(isolate, property);
|
||||||
const char *name = ToCString(cstr);
|
const char *name = ToCString(cstr);
|
||||||
uint name_len = cstr.length();
|
uint32_t name_len = cstr.length();
|
||||||
char *lower = estrndup(name, name_len);
|
char *lower = estrndup(name, name_len);
|
||||||
zend_string *method_name;
|
zend_string *method_name;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user