@@ -301,13 +301,6 @@ static zend_object *reflection_objects_new(zend_class_entry *class_type) /* {{{
301
301
}
302
302
/* }}} */
303
303
304
- static zval * reflection_instantiate (zend_class_entry * pce , zval * object ) /* {{{ */
305
- {
306
- object_init_ex (object , pce );
307
- return object ;
308
- }
309
- /* }}} */
310
-
311
304
static void _const_string (smart_str * str , const char * name , zval * value , const char * indent );
312
305
static void _function_string (smart_str * str , zend_function * fptr , zend_class_entry * scope , const char * indent );
313
306
static void _property_string (smart_str * str , zend_property_info * prop , const char * prop_name , const char * indent );
@@ -1168,7 +1161,7 @@ static void reflection_attribute_factory(zval *object, HashTable *attributes, ze
1168
1161
reflection_object * intern ;
1169
1162
attribute_reference * reference ;
1170
1163
1171
- reflection_instantiate ( reflection_attribute_ptr , object );
1164
+ object_init_ex ( object , reflection_attribute_ptr );
1172
1165
intern = Z_REFLECTION_P (object );
1173
1166
reference = (attribute_reference * ) emalloc (sizeof (attribute_reference ));
1174
1167
reference -> attributes = attributes ;
@@ -1316,7 +1309,7 @@ PHPAPI void zend_reflection_class_factory(zend_class_entry *ce, zval *object)
1316
1309
1317
1310
zend_class_entry * reflection_ce =
1318
1311
ce -> ce_flags & ZEND_ACC_ENUM ? reflection_enum_ptr : reflection_class_ptr ;
1319
- reflection_instantiate ( reflection_ce , object );
1312
+ object_init_ex ( object , reflection_ce );
1320
1313
intern = Z_REFLECTION_P (object );
1321
1314
intern -> ptr = ce ;
1322
1315
intern -> ref_type = REF_TYPE_OTHER ;
@@ -1328,7 +1321,7 @@ PHPAPI void zend_reflection_class_factory(zend_class_entry *ce, zval *object)
1328
1321
/* {{{ reflection_extension_factory_ex */
1329
1322
static void reflection_extension_factory_ex (zval * object , zend_module_entry * module )
1330
1323
{
1331
- reflection_instantiate ( reflection_extension_ptr , object );
1324
+ object_init_ex ( object , reflection_extension_ptr );
1332
1325
reflection_object * intern = Z_REFLECTION_P (object );
1333
1326
intern -> ptr = module ;
1334
1327
intern -> ref_type = REF_TYPE_OTHER ;
@@ -1363,7 +1356,7 @@ static void reflection_parameter_factory(zend_function *fptr, zval *closure_obje
1363
1356
parameter_reference * reference ;
1364
1357
zval * prop_name ;
1365
1358
1366
- reflection_instantiate ( reflection_parameter_ptr , object );
1359
+ object_init_ex ( object , reflection_parameter_ptr );
1367
1360
intern = Z_REFLECTION_P (object );
1368
1361
reference = (parameter_reference * ) emalloc (sizeof (parameter_reference ));
1369
1362
reference -> arg_info = arg_info ;
@@ -1438,13 +1431,13 @@ static void reflection_type_factory(zend_type type, zval *object, bool legacy_be
1438
1431
1439
1432
switch (type_kind ) {
1440
1433
case INTERSECTION_TYPE :
1441
- reflection_instantiate ( reflection_intersection_type_ptr , object );
1434
+ object_init_ex ( object , reflection_intersection_type_ptr );
1442
1435
break ;
1443
1436
case UNION_TYPE :
1444
- reflection_instantiate ( reflection_union_type_ptr , object );
1437
+ object_init_ex ( object , reflection_union_type_ptr );
1445
1438
break ;
1446
1439
case NAMED_TYPE :
1447
- reflection_instantiate ( reflection_named_type_ptr , object );
1440
+ object_init_ex ( object , reflection_named_type_ptr );
1448
1441
break ;
1449
1442
EMPTY_SWITCH_DEFAULT_CASE ();
1450
1443
}
@@ -1471,7 +1464,7 @@ static void reflection_type_factory(zend_type type, zval *object, bool legacy_be
1471
1464
static void reflection_function_factory (zend_function * function , zval * closure_object , zval * object )
1472
1465
{
1473
1466
reflection_object * intern ;
1474
- reflection_instantiate ( reflection_function_ptr , object );
1467
+ object_init_ex ( object , reflection_function_ptr );
1475
1468
intern = Z_REFLECTION_P (object );
1476
1469
intern -> ptr = function ;
1477
1470
intern -> ref_type = REF_TYPE_FUNCTION ;
@@ -1488,7 +1481,7 @@ static void reflection_method_factory(zend_class_entry *ce, zend_function *metho
1488
1481
{
1489
1482
reflection_object * intern ;
1490
1483
1491
- reflection_instantiate ( reflection_method_ptr , object );
1484
+ object_init_ex ( object , reflection_method_ptr );
1492
1485
intern = Z_REFLECTION_P (object );
1493
1486
intern -> ptr = method ;
1494
1487
intern -> ref_type = REF_TYPE_FUNCTION ;
@@ -1508,7 +1501,7 @@ static void reflection_property_factory(zend_class_entry *ce, zend_string *name,
1508
1501
reflection_object * intern ;
1509
1502
property_reference * reference ;
1510
1503
1511
- reflection_instantiate ( reflection_property_ptr , object );
1504
+ object_init_ex ( object , reflection_property_ptr );
1512
1505
intern = Z_REFLECTION_P (object );
1513
1506
reference = (property_reference * ) emalloc (sizeof (property_reference ));
1514
1507
reference -> prop = prop ;
@@ -1533,7 +1526,7 @@ static void reflection_class_constant_factory(zend_string *name_str, zend_class_
1533
1526
{
1534
1527
reflection_object * intern ;
1535
1528
1536
- reflection_instantiate ( reflection_class_constant_ptr , object );
1529
+ object_init_ex ( object , reflection_class_constant_ptr );
1537
1530
intern = Z_REFLECTION_P (object );
1538
1531
intern -> ptr = constant ;
1539
1532
intern -> ref_type = REF_TYPE_CLASS_CONSTANT ;
@@ -1551,7 +1544,7 @@ static void reflection_enum_case_factory(zend_class_entry *ce, zend_string *name
1551
1544
zend_class_entry * case_reflection_class = ce -> enum_backing_type == IS_UNDEF
1552
1545
? reflection_enum_unit_case_ptr
1553
1546
: reflection_enum_backed_case_ptr ;
1554
- reflection_instantiate ( case_reflection_class , object );
1547
+ object_init_ex ( object , case_reflection_class );
1555
1548
intern = Z_REFLECTION_P (object );
1556
1549
intern -> ptr = constant ;
1557
1550
intern -> ref_type = REF_TYPE_CLASS_CONSTANT ;
0 commit comments