mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02: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
3 changed files with 2 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue