Skip to content

Commit c4f4f1e

Browse files
committed
Share zval_make_interned_string() helper
The same function was defined in zend_compile.c and zend_API.c.
1 parent 36d2dd0 commit c4f4f1e

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4024,16 +4024,6 @@ ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
40244024
}
40254025
/* }}} */
40264026

4027-
static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
4028-
{
4029-
ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING);
4030-
Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv));
4031-
if (ZSTR_IS_INTERNED(Z_STR_P(zv))) {
4032-
Z_TYPE_FLAGS_P(zv) = 0;
4033-
}
4034-
return Z_STR_P(zv);
4035-
}
4036-
40374027
static zend_always_inline bool is_persistent_class(zend_class_entry *ce) {
40384028
return (ce->type & ZEND_INTERNAL_CLASS)
40394029
&& ce->info.internal.module->type == MODULE_PERSISTENT;

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{
501501
}
502502
/* }}} */
503503

504-
static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
504+
zend_string *zval_make_interned_string(zval *zv)
505505
{
506506
ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING);
507507
Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv));

Zend/zend_compile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
815815

816816
ZEND_API void function_add_ref(zend_function *function);
817817
void zend_init_static_variables_map_ptr(zend_op_array *op_array);
818+
zend_string *zval_make_interned_string(zval *zv);
818819

819820
#define INITIAL_OP_ARRAY_SIZE 64
820821

0 commit comments

Comments
 (0)