Skip to content

Commit 9147687

Browse files
committed
ext/standard/file.c: Use more appropriate types
1 parent 369eeb7 commit 9147687

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

ext/standard/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,26 +1504,26 @@ PHP_FUNCTION(copy)
15041504
/* }}} */
15051505

15061506
/* {{{ php_copy_file */
1507-
PHPAPI int php_copy_file(const char *src, const char *dest)
1507+
PHPAPI zend_result php_copy_file(const char *src, const char *dest)
15081508
{
15091509
return php_copy_file_ctx(src, dest, 0, NULL);
15101510
}
15111511
/* }}} */
15121512

15131513
/* {{{ php_copy_file_ex */
1514-
PHPAPI int php_copy_file_ex(const char *src, const char *dest, int src_flg)
1514+
PHPAPI zend_result php_copy_file_ex(const char *src, const char *dest, int src_flags)
15151515
{
1516-
return php_copy_file_ctx(src, dest, src_flg, NULL);
1516+
return php_copy_file_ctx(src, dest, src_flags, NULL);
15171517
}
15181518
/* }}} */
15191519

15201520
/* {{{ php_copy_file_ctx */
1521-
PHPAPI int php_copy_file_ctx(const char *src, const char *dest, int src_flg, php_stream_context *ctx)
1521+
PHPAPI zend_result php_copy_file_ctx(const char *src, const char *dest, int src_flags, php_stream_context *ctx)
15221522
{
15231523
php_stream *srcstream = NULL, *deststream = NULL;
1524-
int ret = FAILURE;
1524+
zend_result ret = FAILURE;
15251525
php_stream_statbuf src_s, dest_s;
1526-
int src_stat_flags = (src_flg & STREAM_DISABLE_OPEN_BASEDIR) ? PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR : 0;
1526+
int src_stat_flags = (src_flags & STREAM_DISABLE_OPEN_BASEDIR) ? PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR : 0;
15271527

15281528
switch (php_stream_stat_path_ex(src, src_stat_flags, &src_s, ctx)) {
15291529
case -1:
@@ -1590,7 +1590,7 @@ PHPAPI int php_copy_file_ctx(const char *src, const char *dest, int src_flg, php
15901590
}
15911591
safe_to_copy:
15921592

1593-
srcstream = php_stream_open_wrapper_ex(src, "rb", src_flg | REPORT_ERRORS, NULL, ctx);
1593+
srcstream = php_stream_open_wrapper_ex(src, "rb", src_flags | REPORT_ERRORS, NULL, ctx);
15941594

15951595
if (!srcstream) {
15961596
return ret;

ext/standard/file.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ PHP_MINIT_FUNCTION(user_streams);
3838

3939
PHPAPI int php_le_stream_context(void);
4040
PHPAPI int php_set_sock_blocking(php_socket_t socketd, int block);
41-
PHPAPI int php_copy_file(const char *src, const char *dest);
42-
PHPAPI int php_copy_file_ex(const char *src, const char *dest, int src_chk);
43-
PHPAPI int php_copy_file_ctx(const char *src, const char *dest, int src_chk, php_stream_context *ctx);
41+
PHPAPI zend_result php_copy_file(const char *src, const char *dest);
42+
PHPAPI zend_result php_copy_file_ex(const char *src, const char *dest, int src_flags);
43+
PHPAPI zend_result php_copy_file_ctx(const char *src, const char *dest, int src_flags, php_stream_context *ctx);
4444
PHPAPI int php_mkdir_ex(const char *dir, zend_long mode, int options);
4545
PHPAPI int php_mkdir(const char *dir, zend_long mode);
4646
PHPAPI void php_fstat(php_stream *stream, zval *return_value);

0 commit comments

Comments
 (0)