Skip to content

Commit 029fa49

Browse files
committed
Declare methods normally instead of using a wrapper macro
1 parent e5afe6b commit 029fa49

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

ext/spl/spl_directory.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,15 +2378,6 @@ PHP_METHOD(SplFileObject, getChildren)
23782378
/* return NULL */
23792379
} /* }}} */
23802380

2381-
/* {{{ FileFunction */
2382-
#define FileFunction(func_name) \
2383-
PHP_METHOD(SplFileObject, func_name) \
2384-
{ \
2385-
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS); \
2386-
FileFunctionCall(func_name, ZEND_NUM_ARGS()); \
2387-
}
2388-
/* }}} */
2389-
23902381
/* {{{ Return current line as csv */
23912382
PHP_METHOD(SplFileObject, fgetcsv)
23922383
{
@@ -2567,7 +2558,11 @@ PHP_METHOD(SplFileObject, getCsvControl)
25672558
/* }}} */
25682559

25692560
/* {{{ Portable file locking */
2570-
FileFunction(flock)
2561+
PHP_METHOD(SplFileObject, flock)
2562+
{
2563+
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS);
2564+
FileFunctionCall(flock, ZEND_NUM_ARGS());
2565+
}
25712566
/* }}} */
25722567

25732568
/* {{{ Flush the file */
@@ -2746,7 +2741,11 @@ PHP_METHOD(SplFileObject, fread)
27462741
}
27472742

27482743
/* {{{ Stat() on a filehandle */
2749-
FileFunction(fstat)
2744+
PHP_METHOD(SplFileObject, fstat)
2745+
{
2746+
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(ZEND_THIS);
2747+
FileFunctionCall(fstat, ZEND_NUM_ARGS());
2748+
}
27502749
/* }}} */
27512750

27522751
/* {{{ Truncate file to 'size' length */

0 commit comments

Comments
 (0)