mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Zend/zend_variables: use C99 designated initializers (#10655)
This change allows to potentially turn the ``IS_`` macros into an enum with automatic values.
This commit is contained in:
parent
101178214c
commit
0460420205
1 changed files with 12 additions and 12 deletions
|
@ -37,18 +37,18 @@ static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref);
|
|||
typedef void (ZEND_FASTCALL *zend_rc_dtor_func_t)(zend_refcounted *p);
|
||||
|
||||
static const zend_rc_dtor_func_t zend_rc_dtor_func[] = {
|
||||
/* IS_UNDEF */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_NULL */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_FALSE */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_TRUE */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_LONG */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_DOUBLE */ (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
/* IS_STRING */ (zend_rc_dtor_func_t)zend_string_destroy,
|
||||
/* IS_ARRAY */ (zend_rc_dtor_func_t)zend_array_destroy,
|
||||
/* IS_OBJECT */ (zend_rc_dtor_func_t)zend_objects_store_del,
|
||||
/* IS_RESOURCE */ (zend_rc_dtor_func_t)zend_list_free,
|
||||
/* IS_REFERENCE */ (zend_rc_dtor_func_t)zend_reference_destroy,
|
||||
/* IS_CONSTANT_AST */ (zend_rc_dtor_func_t)zend_ast_ref_destroy
|
||||
[IS_UNDEF] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_NULL] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_FALSE] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_TRUE] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_LONG] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_DOUBLE] = (zend_rc_dtor_func_t)zend_empty_destroy,
|
||||
[IS_STRING] = (zend_rc_dtor_func_t)zend_string_destroy,
|
||||
[IS_ARRAY] = (zend_rc_dtor_func_t)zend_array_destroy,
|
||||
[IS_OBJECT] = (zend_rc_dtor_func_t)zend_objects_store_del,
|
||||
[IS_RESOURCE] = (zend_rc_dtor_func_t)zend_list_free,
|
||||
[IS_REFERENCE] = (zend_rc_dtor_func_t)zend_reference_destroy,
|
||||
[IS_CONSTANT_AST] = (zend_rc_dtor_func_t)zend_ast_ref_destroy
|
||||
};
|
||||
|
||||
ZEND_API void ZEND_FASTCALL rc_dtor_func(zend_refcounted *p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue