Skip to content

Commit 55d449f

Browse files
authored
Zend: remove zend_set_hash_symbol() API (#20413)
This is unused both within php-src and a SourceGraph search returned 0 results. This is also confusing as it talks about symbol tables without actually using any of the corresponding update functions.
1 parent f5f81fe commit 55d449f

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PHP 8.6 INTERNALS UPGRADE NOTES
4343
pointer.
4444
. The zend_get_call_trampoline_func() API now takes the __call or
4545
__callStatic zend_function* instead of a CE and a boolean argument.
46+
. The zend_set_hash_symbol() API has been removed.
4647

4748
========================
4849
2. Build system changes

Zend/zend_API.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,29 +3611,6 @@ ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_
36113611
}
36123612
/* }}} */
36133613

3614-
// TODO num_symbol_tables as unsigned int?
3615-
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...) /* {{{ */
3616-
{
3617-
HashTable *symbol_table;
3618-
va_list symbol_table_list;
3619-
3620-
if (num_symbol_tables <= 0) return FAILURE;
3621-
3622-
if (is_ref) {
3623-
ZVAL_MAKE_REF(symbol);
3624-
}
3625-
3626-
va_start(symbol_table_list, num_symbol_tables);
3627-
while (num_symbol_tables-- > 0) {
3628-
symbol_table = va_arg(symbol_table_list, HashTable *);
3629-
zend_hash_str_update(symbol_table, name, name_length, symbol);
3630-
Z_TRY_ADDREF_P(symbol);
3631-
}
3632-
va_end(symbol_table_list);
3633-
return SUCCESS;
3634-
}
3635-
/* }}} */
3636-
36373614
/* Disabled functions support */
36383615

36393616
static void zend_disable_function(const char *function_name, size_t function_name_length)

Zend/zend_API.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,6 @@ ZEND_API zend_result zend_call_method_if_exists(
884884
zend_object *object, zend_string *method_name, zval *retval,
885885
uint32_t param_count, zval *params);
886886

887-
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables, ...);
888-
889887
ZEND_API zend_result zend_delete_global_variable(zend_string *name);
890888

891889
ZEND_API zend_array *zend_rebuild_symbol_table(void);

0 commit comments

Comments
 (0)