Skip to content

Commit e34424a

Browse files
committed
const
1 parent 1fc5632 commit e34424a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

Zend/zend_partial.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ static zend_op_array *zp_compile(zval *this_ptr, zend_function *function,
10321032
goto clean;
10331033
}
10341034

1035-
static zend_op_array *zp_get_op_array(zval *this_ptr, zend_function *function,
1035+
static const zend_op_array *zp_get_op_array(zval *this_ptr, zend_function *function,
10361036
uint32_t argc, zval *argv, zend_array *extra_named_params,
10371037
const zend_array *named_positions,
10381038
const zend_op_array *declaring_op_array,
@@ -1045,7 +1045,7 @@ static zend_op_array *zp_get_op_array(zval *this_ptr, zend_function *function,
10451045
return cache_slot[1];
10461046
}
10471047

1048-
zend_op_array *op_array = zend_accel_pfa_cache_get(declaring_op_array,
1048+
const zend_op_array *op_array = zend_accel_pfa_cache_get(declaring_op_array,
10491049
declaring_opline, function);
10501050

10511051
if (UNEXPECTED(!op_array)) {
@@ -1058,7 +1058,7 @@ static zend_op_array *zp_get_op_array(zval *this_ptr, zend_function *function,
10581058
cache_slot[0] = function->type == ZEND_INTERNAL_FUNCTION
10591059
? (void*)function
10601060
: (void*)function->op_array.opcodes;
1061-
cache_slot[1] = op_array;
1061+
cache_slot[1] = (zend_op_array*)op_array;
10621062
}
10631063

10641064
return op_array;
@@ -1119,7 +1119,7 @@ void zend_partial_create(zval *result, zval *this_ptr, zend_function *function,
11191119
const zend_op *declaring_opline, void **cache_slot,
11201120
bool uses_variadic_placeholder) {
11211121

1122-
zend_op_array *op_array = zp_get_op_array(this_ptr, function, argc, argv,
1122+
const zend_op_array *op_array = zp_get_op_array(this_ptr, function, argc, argv,
11231123
extra_named_params, named_positions,
11241124
declaring_op_array, declaring_opline,
11251125
cache_slot, uses_variadic_placeholder);

ext/opcache/ZendAccelerator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ static zend_string *zend_accel_pfa_key(const zend_op *declaring_opline,
20712071
return key;
20722072
}
20732073

2074-
zend_op_array *zend_accel_pfa_cache_get(const zend_op_array *declaring_op_array,
2074+
const zend_op_array *zend_accel_pfa_cache_get(const zend_op_array *declaring_op_array,
20752075
const zend_op *declaring_opline, const zend_function *called_function)
20762076
{
20772077
zend_string *key = zend_accel_pfa_key(declaring_opline, called_function);

ext/opcache/ZendAccelerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ zend_string* ZEND_FASTCALL accel_new_interned_string(zend_string *str);
336336

337337
uint32_t zend_accel_get_class_name_map_ptr(zend_string *type_name);
338338

339-
zend_op_array *zend_accel_pfa_cache_get(const zend_op_array *declaring_op_array,
339+
const zend_op_array *zend_accel_pfa_cache_get(const zend_op_array *declaring_op_array,
340340
const zend_op *declaring_opline,
341341
const zend_function *called_function);
342342

0 commit comments

Comments
 (0)