Skip to content

Update ext/gd parameter names #6308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ PHP_FUNCTION(imagecopyresampled)
PHP_FUNCTION(imagegrabwindow)
{
HWND window;
zend_long client_area = 0;
zend_bool client_area = 0;
RECT rc = {0};
int Width, Height;
HDC hdc;
Expand All @@ -1150,7 +1150,7 @@ PHP_FUNCTION(imagegrabwindow)
zend_long lwindow_handle;
gdImagePtr im = NULL;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &lwindow_handle, &client_area) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|b", &lwindow_handle, &client_area) == FAILURE) {
RETURN_THROWS();
}

Expand Down Expand Up @@ -1269,9 +1269,9 @@ PHP_FUNCTION(imagerotate)
gdImagePtr im_dst, im_src;
double degrees;
zend_long color;
zend_long ignoretransparent = 0;
zend_bool ignoretransparent = 0;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|l", &SIM, gd_image_ce, &degrees, &color, &ignoretransparent) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Odl|b", &SIM, gd_image_ce, &degrees, &color, &ignoretransparent) == FAILURE) {
RETURN_THROWS();
}

Expand Down Expand Up @@ -2579,11 +2579,11 @@ PHP_FUNCTION(imagecolortransparent)
PHP_FUNCTION(imageinterlace)
{
zval *IM;
zend_long INT = 0;
zend_bool INT = 0;
zend_bool INT_IS_NULL = 1;
gdImagePtr im;

if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l!", &IM, gd_image_ce, &INT, &INT_IS_NULL) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|b!", &IM, gd_image_ce, &INT, &INT_IS_NULL) == FAILURE) {
RETURN_THROWS();
}

Expand Down
190 changes: 96 additions & 94 deletions ext/gd/gd.stub.php

Large diffs are not rendered by default.

Loading