@@ -114,7 +114,7 @@ php_file_globals file_globals;
114
114
115
115
/* }}} */
116
116
117
- #define PHP_STREAM_TO_ZVAL (stream , arg ) \
117
+ #define PHP_STREAM_FROM_ZVAL (stream , arg ) \
118
118
ZEND_ASSERT(Z_TYPE_P(arg) == IS_RESOURCE); \
119
119
php_stream_from_res(stream, Z_RES_P(arg));
120
120
@@ -238,7 +238,7 @@ PHP_FUNCTION(flock)
238
238
Z_PARAM_ZVAL (wouldblock )
239
239
ZEND_PARSE_PARAMETERS_END ();
240
240
241
- PHP_STREAM_TO_ZVAL (stream , res );
241
+ PHP_STREAM_FROM_ZVAL (stream , res );
242
242
243
243
php_flock_common (stream , operation , 2 , wouldblock , return_value );
244
244
}
@@ -775,7 +775,7 @@ PHPAPI PHP_FUNCTION(fclose)
775
775
Z_PARAM_RESOURCE (res )
776
776
ZEND_PARSE_PARAMETERS_END ();
777
777
778
- PHP_STREAM_TO_ZVAL (stream , res );
778
+ PHP_STREAM_FROM_ZVAL (stream , res );
779
779
780
780
if ((stream -> flags & PHP_STREAM_FLAG_NO_FCLOSE ) != 0 ) {
781
781
php_error_docref (NULL , E_WARNING , ZEND_LONG_FMT " is not a valid stream resource" , stream -> res -> handle );
@@ -855,7 +855,7 @@ PHP_FUNCTION(pclose)
855
855
Z_PARAM_RESOURCE (res )
856
856
ZEND_PARSE_PARAMETERS_END ();
857
857
858
- PHP_STREAM_TO_ZVAL (stream , res );
858
+ PHP_STREAM_FROM_ZVAL (stream , res );
859
859
860
860
FG (pclose_wait ) = 1 ;
861
861
zend_list_close (stream -> res );
@@ -874,7 +874,7 @@ PHPAPI PHP_FUNCTION(feof)
874
874
Z_PARAM_RESOURCE (res )
875
875
ZEND_PARSE_PARAMETERS_END ();
876
876
877
- PHP_STREAM_TO_ZVAL (stream , res );
877
+ PHP_STREAM_FROM_ZVAL (stream , res );
878
878
879
879
if (php_stream_eof (stream )) {
880
880
RETURN_TRUE ;
@@ -901,7 +901,7 @@ PHPAPI PHP_FUNCTION(fgets)
901
901
Z_PARAM_LONG_OR_NULL (len , len_is_null )
902
902
ZEND_PARSE_PARAMETERS_END ();
903
903
904
- PHP_STREAM_TO_ZVAL (stream , res );
904
+ PHP_STREAM_FROM_ZVAL (stream , res );
905
905
906
906
if (len_is_null ) {
907
907
/* ask streams to give us a buffer of an appropriate size */
@@ -945,7 +945,7 @@ PHPAPI PHP_FUNCTION(fgetc)
945
945
Z_PARAM_RESOURCE (res )
946
946
ZEND_PARSE_PARAMETERS_END ();
947
947
948
- PHP_STREAM_TO_ZVAL (stream , res );
948
+ PHP_STREAM_FROM_ZVAL (stream , res );
949
949
950
950
int result = php_stream_getc (stream );
951
951
@@ -1029,7 +1029,7 @@ PHPAPI PHP_FUNCTION(fwrite)
1029
1029
RETURN_LONG (0 );
1030
1030
}
1031
1031
1032
- PHP_STREAM_TO_ZVAL (stream , res );
1032
+ PHP_STREAM_FROM_ZVAL (stream , res );
1033
1033
1034
1034
ret = php_stream_write (stream , input , num_bytes );
1035
1035
if (ret < 0 ) {
@@ -1051,7 +1051,7 @@ PHPAPI PHP_FUNCTION(fflush)
1051
1051
Z_PARAM_RESOURCE (res )
1052
1052
ZEND_PARSE_PARAMETERS_END ();
1053
1053
1054
- PHP_STREAM_TO_ZVAL (stream , res );
1054
+ PHP_STREAM_FROM_ZVAL (stream , res );
1055
1055
1056
1056
ret = php_stream_flush (stream );
1057
1057
if (ret ) {
@@ -1071,7 +1071,7 @@ PHPAPI PHP_FUNCTION(rewind)
1071
1071
Z_PARAM_RESOURCE (res )
1072
1072
ZEND_PARSE_PARAMETERS_END ();
1073
1073
1074
- PHP_STREAM_TO_ZVAL (stream , res );
1074
+ PHP_STREAM_FROM_ZVAL (stream , res );
1075
1075
1076
1076
if (-1 == php_stream_rewind (stream )) {
1077
1077
RETURN_FALSE ;
@@ -1091,7 +1091,7 @@ PHPAPI PHP_FUNCTION(ftell)
1091
1091
Z_PARAM_RESOURCE (res )
1092
1092
ZEND_PARSE_PARAMETERS_END ();
1093
1093
1094
- PHP_STREAM_TO_ZVAL (stream , res );
1094
+ PHP_STREAM_FROM_ZVAL (stream , res );
1095
1095
1096
1096
ret = php_stream_tell (stream );
1097
1097
if (ret == -1 ) {
@@ -1115,7 +1115,7 @@ PHPAPI PHP_FUNCTION(fseek)
1115
1115
Z_PARAM_LONG (whence )
1116
1116
ZEND_PARSE_PARAMETERS_END ();
1117
1117
1118
- PHP_STREAM_TO_ZVAL (stream , res );
1118
+ PHP_STREAM_FROM_ZVAL (stream , res );
1119
1119
1120
1120
RETURN_LONG (php_stream_seek (stream , offset , (int ) whence ));
1121
1121
}
@@ -1259,7 +1259,7 @@ PHPAPI PHP_FUNCTION(fpassthru)
1259
1259
Z_PARAM_RESOURCE (res )
1260
1260
ZEND_PARSE_PARAMETERS_END ();
1261
1261
1262
- PHP_STREAM_TO_ZVAL (stream , res );
1262
+ PHP_STREAM_FROM_ZVAL (stream , res );
1263
1263
1264
1264
size = php_stream_passthru (stream );
1265
1265
RETURN_LONG (size );
@@ -1346,7 +1346,7 @@ PHP_FUNCTION(fsync)
1346
1346
Z_PARAM_RESOURCE (res )
1347
1347
ZEND_PARSE_PARAMETERS_END ();
1348
1348
1349
- PHP_STREAM_TO_ZVAL (stream , res );
1349
+ PHP_STREAM_FROM_ZVAL (stream , res );
1350
1350
1351
1351
if (!php_stream_sync_supported (stream )) {
1352
1352
php_error_docref (NULL , E_WARNING , "Can't fsync this stream!" );
@@ -1365,7 +1365,7 @@ PHP_FUNCTION(fdatasync)
1365
1365
Z_PARAM_RESOURCE (res )
1366
1366
ZEND_PARSE_PARAMETERS_END ();
1367
1367
1368
- PHP_STREAM_TO_ZVAL (stream , res );
1368
+ PHP_STREAM_FROM_ZVAL (stream , res );
1369
1369
1370
1370
if (!php_stream_sync_supported (stream )) {
1371
1371
php_error_docref (NULL , E_WARNING , "Can't fsync this stream!" );
@@ -1392,7 +1392,7 @@ PHP_FUNCTION(ftruncate)
1392
1392
RETURN_THROWS ();
1393
1393
}
1394
1394
1395
- PHP_STREAM_TO_ZVAL (stream , fp );
1395
+ PHP_STREAM_FROM_ZVAL (stream , fp );
1396
1396
1397
1397
if (!php_stream_truncate_supported (stream )) {
1398
1398
php_error_docref (NULL , E_WARNING , "Can't truncate this stream!" );
@@ -1484,7 +1484,7 @@ PHP_FUNCTION(fstat)
1484
1484
Z_PARAM_RESOURCE (fp )
1485
1485
ZEND_PARSE_PARAMETERS_END ();
1486
1486
1487
- PHP_STREAM_TO_ZVAL (stream , fp );
1487
+ PHP_STREAM_FROM_ZVAL (stream , fp );
1488
1488
1489
1489
php_fstat (stream , return_value );
1490
1490
}
@@ -1639,7 +1639,7 @@ PHPAPI PHP_FUNCTION(fread)
1639
1639
Z_PARAM_LONG (len )
1640
1640
ZEND_PARSE_PARAMETERS_END ();
1641
1641
1642
- PHP_STREAM_TO_ZVAL (stream , res );
1642
+ PHP_STREAM_FROM_ZVAL (stream , res );
1643
1643
1644
1644
if (len <= 0 ) {
1645
1645
zend_argument_value_error (2 , "must be greater than 0" );
@@ -1752,7 +1752,7 @@ PHP_FUNCTION(fputcsv)
1752
1752
}
1753
1753
}
1754
1754
1755
- PHP_STREAM_TO_ZVAL (stream , fp );
1755
+ PHP_STREAM_FROM_ZVAL (stream , fp );
1756
1756
1757
1757
ret = php_fputcsv (stream , fields , delimiter , enclosure , escape_char , eol_str );
1758
1758
if (ret < 0 ) {
@@ -1899,7 +1899,7 @@ PHP_FUNCTION(fgetcsv)
1899
1899
RETURN_THROWS ();
1900
1900
}
1901
1901
1902
- PHP_STREAM_TO_ZVAL (stream , fd );
1902
+ PHP_STREAM_FROM_ZVAL (stream , fd );
1903
1903
}
1904
1904
1905
1905
if (len < 0 ) {
0 commit comments