com php-src: Change the name of the second parameter of image writer functions: ext/gd/gd.c

From: Date: Mon, 05 Sep 2016 07:43:30 +0000
Subject: com php-src: Change the name of the second parameter of image writer functions: ext/gd/gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94310@lists.php.net to get a copy of this message
Commit: f203de0748742261658a7f7007d000beeb4c815a Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 23 Jul 2016 15:36:49 +0200 Committer: Stanislav Malyshev <stas@php.net> Mon, 5 Sep 2016 00:43:30 -0700 Parents: 0d4411d7c86dcbc020435afc7c0827e7840ea0d0 Branches: PHP-7..1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f203de0748742261658a7f7007d000beeb4c815a Log: Change the name of the second parameter of image writer functions As of PHP 5.4.0 the second parameter of all image writer functions (except imagexbm) accepts also a stream resource. Therefore the parameter name filename is inappropriate. We change it to to according to what it's already called in _php_image_output_ctx(). We consider the reflection only related BC break acceptable for a minor version. Changed paths: M ext/gd/gd.c Diff: diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 2568599..ff0c5f8 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -361,45 +361,45 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegif, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_END_ARG_INFO() #ifdef HAVE_GD_PNG ZEND_BEGIN_ARG_INFO_EX(arginfo_imagepng, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_END_ARG_INFO() #endif #ifdef HAVE_GD_WEBP ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewebp, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_END_ARG_INFO() #endif #ifdef HAVE_GD_JPG ZEND_BEGIN_ARG_INFO_EX(arginfo_imagejpeg, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_ARG_INFO(0, quality) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_imagewbmp, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_ARG_INFO(0, foreground) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegd, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_imagegd2, 0, 0, 1) ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, to) ZEND_ARG_INFO(0, chunk_size) ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() @@ -2681,7 +2681,7 @@ PHP_FUNCTION(imagexbm) } /* }}} */ -/* {{{ proto bool imagegif(resource im [, string filename]) +/* {{{ proto bool imagegif(resource im [, mixed to]) Output GIF image to browser or file */ PHP_FUNCTION(imagegif) { @@ -2690,7 +2690,7 @@ PHP_FUNCTION(imagegif) /* }}} */ #ifdef HAVE_GD_PNG -/* {{{ proto bool imagepng(resource im [, string filename]) +/* {{{ proto bool imagepng(resource im [, mixed to]) Output PNG image to browser or file */ PHP_FUNCTION(imagepng) { @@ -2701,7 +2701,7 @@ PHP_FUNCTION(imagepng) #ifdef HAVE_GD_WEBP -/* {{{ proto bool imagewebp(resource im [, string filename[, int quality]] ) +/* {{{ proto bool imagewebp(resource im [, mixed to[, int quality]] ) Output WEBP image to browser or file */ PHP_FUNCTION(imagewebp) { @@ -2712,7 +2712,7 @@ PHP_FUNCTION(imagewebp) #ifdef HAVE_GD_JPG -/* {{{ proto bool imagejpeg(resource im [, string filename [, int quality]]) +/* {{{ proto bool imagejpeg(resource im [, mixed to [, int quality]]) Output JPEG image to browser or file */ PHP_FUNCTION(imagejpeg) { @@ -2721,7 +2721,7 @@ PHP_FUNCTION(imagejpeg) /* }}} */ #endif /* HAVE_GD_JPG */ -/* {{{ proto bool imagewbmp(resource im [, string filename [, int foreground]]) +/* {{{ proto bool imagewbmp(resource im [, mixed to [, int foreground]]) Output WBMP image to browser or file */ PHP_FUNCTION(imagewbmp) { @@ -2729,7 +2729,7 @@ PHP_FUNCTION(imagewbmp) } /* }}} */ -/* {{{ proto bool imagegd(resource im [, string filename]) +/* {{{ proto bool imagegd(resource im [, mixed to]) Output GD image to browser or file */ PHP_FUNCTION(imagegd) { @@ -2737,7 +2737,7 @@ PHP_FUNCTION(imagegd) } /* }}} */ -/* {{{ proto bool imagegd2(resource im [, string filename [, int chunk_size [, int type]]]) +/* {{{ proto bool imagegd2(resource im [, mixed to [, int chunk_size [, int type]]]) Output GD2 image to browser or file */ PHP_FUNCTION(imagegd2) {

« previous php.cvs (#94310) next »