Skip to content

Commit

Permalink
add the optional mode (not used)
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jul 23, 2014
1 parent ca019ad commit 1330250
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions imagick.c
Expand Up @@ -1340,6 +1340,12 @@ PHP_IMAGICK_API zend_class_entry *php_imagickpixel_get_class_entry()
ZEND_END_ARG_INFO()
#endif

#if PHP_VERSION_ID >= 50600
ZEND_BEGIN_ARG_INFO_EX(imagick_count_args, 0, 0, 0)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
#endif

/* ImagickDraw */
#if MagickLibVersion > 0x649
ZEND_BEGIN_ARG_INFO_EX(imagickdraw_settextkerning_args, 0, 0, 1)
Expand Down Expand Up @@ -2161,7 +2167,11 @@ static zend_function_entry php_imagick_class_methods[] =
#endif
PHP_ME(imagick, __construct, imagick_construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
PHP_ME(imagick, __tostring, NULL, ZEND_ACC_PUBLIC)
#if PHP_VERSION_ID >= 50600
PHP_ME(imagick, count, imagick_count_args, ZEND_ACC_PUBLIC)
#else
PHP_ME(imagick, count, imagick_zero_args, ZEND_ACC_PUBLIC)
#endif
PHP_ME(imagick, getpixeliterator, imagick_zero_args, ZEND_ACC_PUBLIC)
PHP_ME(imagick, getpixelregioniterator, imagick_getpixelregioniterator_args, ZEND_ACC_PUBLIC)
PHP_ME(imagick, readimage, imagick_readimage_args, ZEND_ACC_PUBLIC)
Expand Down
3 changes: 2 additions & 1 deletion imagick_class.c
Expand Up @@ -2988,8 +2988,9 @@ PHP_METHOD(imagick, __tostring)
PHP_METHOD(imagick, count)
{
php_imagick_object *intern;
long mode = 0;

if (zend_parse_parameters_none() == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &mode) == FAILURE) {
return;
}

Expand Down

0 comments on commit 1330250

Please sign in to comment.