mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Mark zend_visibility_string as returning a const char* (#19951)
This is because the char* returned is immutable and should not be modified.
This commit is contained in:
committed by
GitHub
parent
d77d44e1f7
commit
39d6bc1716
@@ -443,7 +443,7 @@ static zend_always_inline uint32_t zend_visibility_to_set_visibility(uint32_t vi
|
||||
// Must not clash with ZEND_SHORT_CIRCUITING_CHAIN_MASK
|
||||
#define ZEND_JMP_NULL_BP_VAR_IS 4
|
||||
|
||||
char *zend_visibility_string(uint32_t fn_flags);
|
||||
const char *zend_visibility_string(uint32_t fn_flags);
|
||||
|
||||
#define ZEND_PROPERTY_HOOK_COUNT 2
|
||||
#define ZEND_PROPERTY_HOOK_STRUCT_SIZE (sizeof(zend_function*) * ZEND_PROPERTY_HOOK_COUNT)
|
||||
|
||||
@@ -200,7 +200,7 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
char *zend_visibility_string(uint32_t fn_flags) /* {{{ */
|
||||
const char *zend_visibility_string(uint32_t fn_flags) /* {{{ */
|
||||
{
|
||||
if (fn_flags & ZEND_ACC_PUBLIC) {
|
||||
return "public";
|
||||
|
||||
Reference in New Issue
Block a user