@@ -2046,7 +2046,7 @@ ZEND_METHOD(ReflectionFunctionAbstract, getParameters)
20462046 i < fptr -> common .required_num_args ,
20472047 & parameter
20482048 );
2049- add_next_index_zval ( return_value , & parameter );
2049+ zend_hash_next_index_insert_new ( Z_ARRVAL_P ( return_value ) , & parameter );
20502050
20512051 arg_info ++ ;
20522052 }
@@ -4239,7 +4239,7 @@ ZEND_METHOD(ReflectionClass, getMethod)
42394239/* }}} */
42404240
42414241/* {{{ _addmethod */
4242- static void _addmethod (zend_function * mptr , zend_class_entry * ce , zval * retval , zend_long filter )
4242+ static void _addmethod (zend_function * mptr , zend_class_entry * ce , HashTable * ht , zend_long filter )
42434243{
42444244 if ((mptr -> common .fn_flags & ZEND_ACC_PRIVATE ) && mptr -> common .scope != ce ) {
42454245 return ;
@@ -4248,7 +4248,7 @@ static void _addmethod(zend_function *mptr, zend_class_entry *ce, zval *retval,
42484248 if (mptr -> common .fn_flags & filter ) {
42494249 zval method ;
42504250 reflection_method_factory (ce , mptr , NULL , & method );
4251- add_next_index_zval ( retval , & method );
4251+ zend_hash_next_index_insert_new ( ht , & method );
42524252 }
42534253}
42544254/* }}} */
@@ -4274,7 +4274,7 @@ ZEND_METHOD(ReflectionClass, getMethods)
42744274
42754275 array_init (return_value );
42764276 ZEND_HASH_FOREACH_PTR (& ce -> function_table , mptr ) {
4277- _addmethod (mptr , ce , return_value , filter );
4277+ _addmethod (mptr , ce , Z_ARRVAL_P ( return_value ) , filter );
42784278 } ZEND_HASH_FOREACH_END ();
42794279
42804280 if (instanceof_function (ce , zend_ce_closure )) {
@@ -4289,7 +4289,7 @@ ZEND_METHOD(ReflectionClass, getMethods)
42894289 }
42904290 zend_function * closure = zend_get_closure_invoke_method (obj );
42914291 if (closure ) {
4292- _addmethod (closure , ce , return_value , filter );
4292+ _addmethod (closure , ce , Z_ARRVAL_P ( return_value ) , filter );
42934293 }
42944294 if (!has_obj ) {
42954295 zval_ptr_dtor (& obj_tmp );
@@ -4392,7 +4392,7 @@ ZEND_METHOD(ReflectionClass, getProperty)
43924392/* }}} */
43934393
43944394/* {{{ _addproperty */
4395- static void _addproperty (zend_property_info * pptr , zend_string * key , zend_class_entry * ce , zval * retval , long filter )
4395+ static void _addproperty (zend_property_info * pptr , zend_string * key , zend_class_entry * ce , HashTable * ht , long filter )
43964396{
43974397 if ((pptr -> flags & ZEND_ACC_PRIVATE ) && pptr -> ce != ce ) {
43984398 return ;
@@ -4401,7 +4401,7 @@ static void _addproperty(zend_property_info *pptr, zend_string *key, zend_class_
44014401 if (pptr -> flags & filter ) {
44024402 zval property ;
44034403 reflection_property_factory (ce , key , pptr , & property );
4404- add_next_index_zval ( retval , & property );
4404+ zend_hash_next_index_insert_new ( ht , & property );
44054405 }
44064406}
44074407/* }}} */
@@ -4450,7 +4450,7 @@ ZEND_METHOD(ReflectionClass, getProperties)
44504450
44514451 array_init (return_value );
44524452 ZEND_HASH_FOREACH_STR_KEY_PTR (& ce -> properties_info , key , prop_info ) {
4453- _addproperty (prop_info , key , ce , return_value , filter );
4453+ _addproperty (prop_info , key , ce , Z_ARRVAL_P ( return_value ) , filter );
44544454 } ZEND_HASH_FOREACH_END ();
44554455
44564456 if (Z_TYPE (intern -> obj ) != IS_UNDEF && (filter & ZEND_ACC_PUBLIC ) != 0 ) {
@@ -4543,7 +4543,7 @@ ZEND_METHOD(ReflectionClass, getReflectionConstants)
45434543 if (Z_ACCESS_FLAGS (constant -> value ) & filter ) {
45444544 zval class_const ;
45454545 reflection_class_constant_factory (name , constant , & class_const );
4546- zend_hash_next_index_insert (Z_ARRVAL_P (return_value ), & class_const );
4546+ zend_hash_next_index_insert_new (Z_ARRVAL_P (return_value ), & class_const );
45474547 }
45484548 } ZEND_HASH_FOREACH_END ();
45494549}
@@ -6626,7 +6626,7 @@ ZEND_METHOD(ReflectionEnum, getCases)
66266626 if (Z_ACCESS_FLAGS (constant -> value ) & ZEND_CLASS_CONST_IS_CASE ) {
66276627 zval class_const ;
66286628 reflection_enum_case_factory (ce , name , constant , & class_const );
6629- zend_hash_next_index_insert (Z_ARRVAL_P (return_value ), & class_const );
6629+ zend_hash_next_index_insert_new (Z_ARRVAL_P (return_value ), & class_const );
66306630 }
66316631 } ZEND_HASH_FOREACH_END ();
66326632}
0 commit comments