Skip to content

Commit 35c5cf9

Browse files
committed
ext/spl: Remove useless wrapper
1 parent 90b8db4 commit 35c5cf9

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

ext/spl/spl_directory.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void spl_filesystem_object_free_storage(zend_object *object) /* {{{ */
183183
- clone
184184
- new
185185
*/
186-
static zend_object *spl_filesystem_object_new_ex(zend_class_entry *class_type)
186+
static zend_object *spl_filesystem_object_new(zend_class_entry *class_type)
187187
{
188188
spl_filesystem_object *intern;
189189

@@ -202,14 +202,6 @@ static zend_object *spl_filesystem_object_new_ex(zend_class_entry *class_type)
202202
}
203203
/* }}} */
204204

205-
/* {{{ spl_filesystem_object_new */
206-
/* See spl_filesystem_object_new_ex */
207-
static zend_object *spl_filesystem_object_new(zend_class_entry *class_type)
208-
{
209-
return spl_filesystem_object_new_ex(class_type);
210-
}
211-
/* }}} */
212-
213205
PHPAPI zend_string *spl_filesystem_object_get_path(spl_filesystem_object *intern) /* {{{ */
214206
{
215207
#ifdef HAVE_GLOB
@@ -385,7 +377,7 @@ static zend_result spl_filesystem_file_open(spl_filesystem_object *intern, bool
385377
/* {{{ spl_filesystem_object_clone */
386378
/* Local zend_object creation (on stack)
387379
Load the 'other' object
388-
Create a new empty object (See spl_filesystem_object_new_ex)
380+
Create a new empty object (See spl_filesystem_object_new)
389381
Open the directory
390382
Clone other members (properties)
391383
*/
@@ -396,7 +388,7 @@ static zend_object *spl_filesystem_object_clone(zend_object *old_object)
396388
spl_filesystem_object *source;
397389

398390
source = spl_filesystem_from_obj(old_object);
399-
new_object = spl_filesystem_object_new_ex(old_object->ce);
391+
new_object = spl_filesystem_object_new(old_object->ce);
400392
intern = spl_filesystem_from_obj(new_object);
401393

402394
intern->flags = source->flags;
@@ -481,7 +473,7 @@ static spl_filesystem_object *spl_filesystem_object_create_info(zend_string *fil
481473
ZEND_ASSERT(file_path && ZSTR_LEN(file_path) > 0);
482474
ZEND_ASSERT(ce != NULL);
483475

484-
intern = spl_filesystem_from_obj(spl_filesystem_object_new_ex(ce));
476+
intern = spl_filesystem_from_obj(spl_filesystem_object_new(ce));
485477
RETVAL_OBJ(&intern->std);
486478

487479
if (ce->constructor->common.scope != spl_ce_SplFileInfo) {
@@ -517,7 +509,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp
517509
case SPL_FS_INFO:
518510
ce = ce ? ce : source->info_class;
519511

520-
intern = spl_filesystem_from_obj(spl_filesystem_object_new_ex(ce));
512+
intern = spl_filesystem_from_obj(spl_filesystem_object_new(ce));
521513
RETVAL_OBJ(&intern->std);
522514

523515
if (spl_filesystem_object_get_file_name(source) == FAILURE) {
@@ -546,7 +538,7 @@ static spl_filesystem_object *spl_filesystem_object_create_type(int num_args, sp
546538
return NULL;
547539
}
548540

549-
intern = spl_filesystem_from_obj(spl_filesystem_object_new_ex(ce));
541+
intern = spl_filesystem_from_obj(spl_filesystem_object_new(ce));
550542
RETVAL_OBJ(&intern->std);
551543

552544
if (spl_filesystem_object_get_file_name(source) == FAILURE) {

0 commit comments

Comments
 (0)