@@ -71,8 +71,8 @@ ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval
7171ZEND_API bool ZEND_FASTCALL zend_is_identical (const zval * op1 , const zval * op2 );
7272
7373ZEND_API zend_result ZEND_FASTCALL is_equal_function (zval * result , zval * op1 , zval * op2 );
74- ZEND_API zend_result ZEND_FASTCALL is_identical_function (zval * result , zval * op1 , zval * op2 );
75- ZEND_API zend_result ZEND_FASTCALL is_not_identical_function (zval * result , zval * op1 , zval * op2 );
74+ ZEND_API zend_result ZEND_FASTCALL is_identical_function (zval * result , const zval * op1 , const zval * op2 );
75+ ZEND_API zend_result ZEND_FASTCALL is_not_identical_function (zval * result , const zval * op1 , const zval * op2 );
7676ZEND_API zend_result ZEND_FASTCALL is_not_equal_function (zval * result , zval * op1 , zval * op2 );
7777ZEND_API zend_result ZEND_FASTCALL is_smaller_function (zval * result , zval * op1 , zval * op2 );
7878ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function (zval * result , zval * op1 , zval * op2 );
@@ -325,8 +325,8 @@ ZEND_API void ZEND_FASTCALL convert_to_object(zval *op);
325325ZEND_API zend_long ZEND_FASTCALL zval_get_long_func (const zval * op , bool is_strict );
326326ZEND_API zend_long ZEND_FASTCALL zval_try_get_long (const zval * op , bool * failed );
327327ZEND_API double ZEND_FASTCALL zval_get_double_func (const zval * op );
328- ZEND_API zend_string * ZEND_FASTCALL zval_get_string_func (zval * op );
329- ZEND_API zend_string * ZEND_FASTCALL zval_try_get_string_func (zval * op );
328+ ZEND_API zend_string * ZEND_FASTCALL zval_get_string_func (const zval * op );
329+ ZEND_API zend_string * ZEND_FASTCALL zval_try_get_string_func (const zval * op );
330330
331331static zend_always_inline zend_long zval_get_long (const zval * op ) {
332332 return EXPECTED (Z_TYPE_P (op ) == IS_LONG ) ? Z_LVAL_P (op ) : zval_get_long_func (op , false);
@@ -337,11 +337,11 @@ static zend_always_inline zend_long zval_get_long_ex(const zval *op, bool is_str
337337static zend_always_inline double zval_get_double (const zval * op ) {
338338 return EXPECTED (Z_TYPE_P (op ) == IS_DOUBLE ) ? Z_DVAL_P (op ) : zval_get_double_func (op );
339339}
340- static zend_always_inline zend_string * zval_get_string (zval * op ) {
340+ static zend_always_inline zend_string * zval_get_string (const zval * op ) {
341341 return EXPECTED (Z_TYPE_P (op ) == IS_STRING ) ? zend_string_copy (Z_STR_P (op )) : zval_get_string_func (op );
342342}
343343
344- static zend_always_inline zend_string * zval_get_tmp_string (zval * op , zend_string * * tmp ) {
344+ static zend_always_inline zend_string * zval_get_tmp_string (const zval * op , zend_string * * tmp ) {
345345 if (EXPECTED (Z_TYPE_P (op ) == IS_STRING )) {
346346 * tmp = NULL ;
347347 return Z_STR_P (op );
@@ -356,7 +356,7 @@ static zend_always_inline void zend_tmp_string_release(zend_string *tmp) {
356356}
357357
358358/* Like zval_get_string, but returns NULL if the conversion fails with an exception. */
359- static zend_always_inline zend_string * zval_try_get_string (zval * op ) {
359+ static zend_always_inline zend_string * zval_try_get_string (const zval * op ) {
360360 if (EXPECTED (Z_TYPE_P (op ) == IS_STRING )) {
361361 zend_string * ret = zend_string_copy (Z_STR_P (op ));
362362 ZEND_ASSUME (ret != NULL );
@@ -367,7 +367,7 @@ static zend_always_inline zend_string *zval_try_get_string(zval *op) {
367367}
368368
369369/* Like zval_get_tmp_string, but returns NULL if the conversion fails with an exception. */
370- static zend_always_inline zend_string * zval_try_get_tmp_string (zval * op , zend_string * * tmp ) {
370+ static zend_always_inline zend_string * zval_try_get_tmp_string (const zval * op , zend_string * * tmp ) {
371371 if (EXPECTED (Z_TYPE_P (op ) == IS_STRING )) {
372372 zend_string * ret = Z_STR_P (op );
373373 * tmp = NULL ;
@@ -458,11 +458,11 @@ ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2);
458458
459459ZEND_API zend_result ZEND_FASTCALL compare_function (zval * result , zval * op1 , zval * op2 );
460460
461- ZEND_API int ZEND_FASTCALL numeric_compare_function (zval * op1 , zval * op2 );
462- ZEND_API int ZEND_FASTCALL string_compare_function_ex (zval * op1 , zval * op2 , bool case_insensitive );
463- ZEND_API int ZEND_FASTCALL string_compare_function (zval * op1 , zval * op2 );
464- ZEND_API int ZEND_FASTCALL string_case_compare_function (zval * op1 , zval * op2 );
465- ZEND_API int ZEND_FASTCALL string_locale_compare_function (zval * op1 , zval * op2 );
461+ ZEND_API int ZEND_FASTCALL numeric_compare_function (const zval * op1 , const zval * op2 );
462+ ZEND_API int ZEND_FASTCALL string_compare_function_ex (const zval * op1 , const zval * op2 , bool case_insensitive );
463+ ZEND_API int ZEND_FASTCALL string_compare_function (const zval * op1 , const zval * op2 );
464+ ZEND_API int ZEND_FASTCALL string_case_compare_function (const zval * op1 , const zval * op2 );
465+ ZEND_API int ZEND_FASTCALL string_locale_compare_function (const zval * op1 , const zval * op2 );
466466
467467ZEND_API extern const unsigned char zend_tolower_map [256 ];
468468ZEND_API extern const unsigned char zend_toupper_map [256 ];
@@ -488,19 +488,19 @@ static zend_always_inline zend_string* zend_string_toupper(zend_string *str) {
488488 return zend_string_toupper_ex (str , false);
489489}
490490
491- ZEND_API int ZEND_FASTCALL zend_binary_zval_strcmp (zval * s1 , zval * s2 );
492- ZEND_API int ZEND_FASTCALL zend_binary_zval_strncmp (zval * s1 , zval * s2 , zval * s3 );
491+ ZEND_API int ZEND_FASTCALL zend_binary_zval_strcmp (const zval * s1 , const zval * s2 );
492+ ZEND_API int ZEND_FASTCALL zend_binary_zval_strncmp (const zval * s1 , const zval * s2 , const zval * s3 );
493493ZEND_API int ZEND_FASTCALL zend_binary_strcmp (const char * s1 , size_t len1 , const char * s2 , size_t len2 );
494494ZEND_API int ZEND_FASTCALL zend_binary_strncmp (const char * s1 , size_t len1 , const char * s2 , size_t len2 , size_t length );
495495ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp (const char * s1 , size_t len1 , const char * s2 , size_t len2 );
496496ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp (const char * s1 , size_t len1 , const char * s2 , size_t len2 , size_t length );
497497ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp_l (const char * s1 , size_t len1 , const char * s2 , size_t len2 );
498498ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp_l (const char * s1 , size_t len1 , const char * s2 , size_t len2 , size_t length );
499499
500- ZEND_API bool ZEND_FASTCALL zendi_smart_streq (zend_string * s1 , zend_string * s2 );
501- ZEND_API int ZEND_FASTCALL zendi_smart_strcmp (zend_string * s1 , zend_string * s2 );
500+ ZEND_API bool ZEND_FASTCALL zendi_smart_streq (const zend_string * s1 , const zend_string * s2 );
501+ ZEND_API int ZEND_FASTCALL zendi_smart_strcmp (const zend_string * s1 , const zend_string * s2 );
502502ZEND_API int ZEND_FASTCALL zend_compare_symbol_tables (HashTable * ht1 , HashTable * ht2 );
503- ZEND_API int ZEND_FASTCALL zend_compare_arrays (zval * a1 , zval * a2 );
503+ ZEND_API int ZEND_FASTCALL zend_compare_arrays (const zval * a1 , const zval * a2 );
504504ZEND_API int ZEND_FASTCALL zend_compare_objects (zval * o1 , zval * o2 );
505505
506506/** Deprecated in favor of ZEND_STRTOL() */
@@ -947,7 +947,7 @@ static zend_always_inline bool fast_equal_check_string(zval *op1, zval *op2)
947947 return zend_compare (op1 , op2 ) == 0 ;
948948}
949949
950- static zend_always_inline bool fast_is_identical_function (zval * op1 , zval * op2 )
950+ static zend_always_inline bool fast_is_identical_function (const zval * op1 , const zval * op2 )
951951{
952952 if (Z_TYPE_P (op1 ) != Z_TYPE_P (op2 )) {
953953 return 0 ;
@@ -957,7 +957,7 @@ static zend_always_inline bool fast_is_identical_function(zval *op1, zval *op2)
957957 return zend_is_identical (op1 , op2 );
958958}
959959
960- static zend_always_inline bool fast_is_not_identical_function (zval * op1 , zval * op2 )
960+ static zend_always_inline bool fast_is_not_identical_function (const zval * op1 , const zval * op2 )
961961{
962962 if (Z_TYPE_P (op1 ) != Z_TYPE_P (op2 )) {
963963 return 1 ;
0 commit comments