mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Share zval_make_interned_string() helper
The same function was defined in zend_compile.c and zend_API.c.
This commit is contained in:
parent
36d2dd087a
commit
c4f4f1ece7
@ -4024,16 +4024,6 @@ ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING);
|
||||
Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv));
|
||||
if (ZSTR_IS_INTERNED(Z_STR_P(zv))) {
|
||||
Z_TYPE_FLAGS_P(zv) = 0;
|
||||
}
|
||||
return Z_STR_P(zv);
|
||||
}
|
||||
|
||||
static zend_always_inline bool is_persistent_class(zend_class_entry *ce) {
|
||||
return (ce->type & ZEND_INTERNAL_CLASS)
|
||||
&& ce->info.internal.module->type == MODULE_PERSISTENT;
|
||||
|
@ -501,7 +501,7 @@ static int lookup_cv(zend_string *name) /* {{{ */{
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline zend_string *zval_make_interned_string(zval *zv) /* {{{ */
|
||||
zend_string *zval_make_interned_string(zval *zv)
|
||||
{
|
||||
ZEND_ASSERT(Z_TYPE_P(zv) == IS_STRING);
|
||||
Z_STR_P(zv) = zend_new_interned_string(Z_STR_P(zv));
|
||||
|
@ -815,6 +815,7 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline);
|
||||
|
||||
ZEND_API void function_add_ref(zend_function *function);
|
||||
void zend_init_static_variables_map_ptr(zend_op_array *op_array);
|
||||
zend_string *zval_make_interned_string(zval *zv);
|
||||
|
||||
#define INITIAL_OP_ARRAY_SIZE 64
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user