Skip to content

Commit 402f697

Browse files
committed
Remove zend_init_list
No longer used - zend_add_to_list already covers this. Also marked zend_add_to_list as static and dropped it from the header.
1 parent 21a29b4 commit 402f697

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,18 +1455,7 @@ static zend_bool zend_try_ct_eval_class_const(zval *zv, zend_string *class_name,
14551455
}
14561456
/* }}} */
14571457

1458-
void zend_init_list(void *result, void *item) /* {{{ */
1459-
{
1460-
void** list = emalloc(sizeof(void*) * 2);
1461-
1462-
list[0] = item;
1463-
list[1] = NULL;
1464-
1465-
*(void**)result = list;
1466-
}
1467-
/* }}} */
1468-
1469-
void zend_add_to_list(void *result, void *item) /* {{{ */
1458+
static void zend_add_to_list(void *result, void *item) /* {{{ */
14701459
{
14711460
void** list = *(void**)result;
14721461
size_t n = 0;

Zend/zend_compile.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,6 @@ ZEND_API zend_class_entry *do_bind_class(const zend_op_array *op_array, const ze
701701
ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time);
702702
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array);
703703

704-
/* Functions for a null terminated pointer list, used for traits parsing and compilation */
705-
void zend_init_list(void *result, void *item);
706-
void zend_add_to_list(void *result, void *item);
707-
708704
void zend_do_extended_info(void);
709705
void zend_do_extended_fcall_begin(void);
710706
void zend_do_extended_fcall_end(void);

0 commit comments

Comments
 (0)