Skip to content

Commit 6be2206

Browse files
committed
eliminate PHP_MAJOR_VERSION checks
1 parent 10cd73a commit 6be2206

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

v8js_array_access.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ static zval v8js_array_access_dispatch(zend_object *object, const char *method_n
3535
zval php_value;
3636

3737
fci.size = sizeof(fci);
38-
#if (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
39-
fci.function_table = &object->ce->function_table;
40-
fci.symbol_table = NULL;
41-
#endif
4238
ZVAL_STRING(&fci.function_name, method_name);
4339
fci.retval = &php_value;
4440

@@ -50,11 +46,7 @@ static zval v8js_array_access_dispatch(zend_object *object, const char *method_n
5046
fci.params = params;
5147

5248
fci.object = object;
53-
#if (PHP_MAJOR_VERSION < 8)
54-
fci.no_separation = 0;
55-
#else
5649
fci.named_params = NULL;
57-
#endif
5850

5951
zend_call_function(&fci, NULL);
6052
zval_dtor(&fci.function_name);

v8js_methods.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,8 @@ V8JS_METHOD(require)
311311
ZVAL_STRING(&params[0], module_base_cstr);
312312
ZVAL_STRING(&params[1], module_id);
313313

314-
#if (PHP_MAJOR_VERSION < 8)
315-
call_result = call_user_function_ex(EG(function_table), NULL, &c->module_normaliser,
316-
&normaliser_result, 2, params, 0, NULL);
317-
#else
318314
call_result = call_user_function(EG(function_table), NULL, &c->module_normaliser,
319315
&normaliser_result, 2, params);
320-
#endif
321316
}
322317

323318
isolate->Enter();
@@ -440,11 +435,7 @@ V8JS_METHOD(require)
440435

441436
zend_try {
442437
ZVAL_STRING(&params[0], normalised_module_id);
443-
#if (PHP_MAJOR_VERSION < 8)
444-
call_result = call_user_function_ex(EG(function_table), NULL, &c->module_loader, &module_code, 1, params, 0, NULL);
445-
#else
446438
call_result = call_user_function(EG(function_table), NULL, &c->module_loader, &module_code, 1, params);
447-
#endif
448439
}
449440
zend_catch {
450441
v8js_terminate_execution(isolate);

v8js_object_export.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, c
5959

6060
/* zend_fcall_info */
6161
fci.size = sizeof(fci);
62-
#if (PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 0)
63-
fci.function_table = &object->ce->function_table;
64-
fci.symbol_table = NULL;
65-
#endif
6662
fci.function_name = fname;
6763
fci.object = object;
6864
fci.retval = &retval;
@@ -137,11 +133,7 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, c
137133
} else {
138134
fci.params = NULL;
139135
}
140-
#if (PHP_MAJOR_VERSION < 8)
141-
fci.no_separation = 1;
142-
#else
143136
fci.named_params = NULL;
144-
#endif
145137
info.GetReturnValue().Set(V8JS_NULL);
146138

147139
{

0 commit comments

Comments
 (0)