Skip to content

Commit c669fbf

Browse files
committed
Zend/zend_compile: add const qualifiers
1 parent ee40791 commit c669fbf

File tree

5 files changed

+270
-279
lines changed

5 files changed

+270
-279
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num)
430430
zend_argument_value_error(arg_num, "must not be empty");
431431
}
432432

433-
ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string *new_name, zend_class_entry *old_ce)
433+
ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string *new_name, const zend_class_entry *old_ce)
434434
{
435435
if (old_ce->type == ZEND_INTERNAL_CLASS) {
436436
zend_error(type, "Cannot redeclare %s %s",
@@ -445,7 +445,7 @@ ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string
445445
}
446446
}
447447

448-
ZEND_API ZEND_COLD void zend_class_redeclaration_error(int type, zend_class_entry *old_ce)
448+
ZEND_API ZEND_COLD void zend_class_redeclaration_error(int type, const zend_class_entry *old_ce)
449449
{
450450
zend_class_redeclaration_error_ex(type, old_ce->name, old_ce);
451451
}

Zend/zend_API.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,8 +1564,8 @@ ZEND_API ZEND_COLD void zend_argument_error(zend_class_entry *error_ce, uint32_t
15641564
ZEND_API ZEND_COLD void zend_argument_type_error(uint32_t arg_num, const char *format, ...);
15651565
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format, ...);
15661566
ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num);
1567-
ZEND_API ZEND_COLD void zend_class_redeclaration_error(int type, zend_class_entry *old_ce);
1568-
ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string *new_name, zend_class_entry *old_ce);
1567+
ZEND_API ZEND_COLD void zend_class_redeclaration_error(int type, const zend_class_entry *old_ce);
1568+
ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string *new_name, const zend_class_entry *old_ce);
15691569

15701570
#define ZPP_ERROR_OK 0
15711571
#define ZPP_ERROR_FAILURE 1

0 commit comments

Comments
 (0)