mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 08:11:52 +00:00
Change to GC_IS_RECURSIVE for PHP 7.3
This commit is contained in:
parent
c7019e3c1a
commit
826aaa689c
@ -70,7 +70,11 @@ static v8::Local<v8::Value> v8js_hash_to_jsarr(zval *value, v8::Isolate *isolate
|
||||
v8::Local<v8::Array> newarr;
|
||||
|
||||
/* Prevent recursion */
|
||||
#if PHP_VERSION_ID >= 70300
|
||||
if (myht && GC_IS_RECURSIVE(myht)) {
|
||||
#else
|
||||
if (myht && ZEND_HASH_GET_APPLY_COUNT(myht) > 1) {
|
||||
#endif
|
||||
return V8JS_NULL;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,11 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
|
||||
|
||||
zend_class_entry *exception_ce = zend_exception_get_default();
|
||||
if (instanceof_function(php_exception->ce, exception_ce)) {
|
||||
#ifdef GC_ADDREF
|
||||
GC_ADDREF(php_exception);
|
||||
#else
|
||||
++GC_REFCOUNT(php_exception);
|
||||
#endif
|
||||
zend_exception_set_previous(Z_OBJ_P(return_value), php_exception);
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,9 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, v
|
||||
|
||||
zend_try {
|
||||
/* zend_fcall_info_cache */
|
||||
#if PHP_VERSION_ID < 70300
|
||||
fcc.initialized = 1;
|
||||
#endif
|
||||
fcc.function_handler = method_ptr;
|
||||
fcc.calling_scope = object->ce;
|
||||
fcc.called_scope = object->ce;
|
||||
@ -1013,7 +1015,11 @@ v8::Local<v8::Value> v8js_hash_to_jsobj(zval *value, v8::Isolate *isolate) /* {{
|
||||
}
|
||||
|
||||
/* Prevent recursion */
|
||||
#if PHP_VERSION_ID >= 70300
|
||||
if (myht && GC_IS_RECURSIVE(myht)) {
|
||||
#else
|
||||
if (myht && ZEND_HASH_GET_APPLY_COUNT(myht) > 1) {
|
||||
#endif
|
||||
return V8JS_NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user