mirror of
https://github.com/Imagick/imagick.git
synced 2026-06-19 07:35:36 +00:00
Fix datatypes
This commit is contained in:
+4
-4
@@ -2369,7 +2369,7 @@ PHP_METHOD(imagick, setimagegravity)
|
||||
PHP_METHOD(imagick, importimagepixels)
|
||||
{
|
||||
double *double_array;
|
||||
long *long_array;
|
||||
im_long *long_array;
|
||||
unsigned char *char_array;
|
||||
|
||||
php_imagick_object *intern;
|
||||
@@ -7722,10 +7722,10 @@ PHP_METHOD(imagick, getnumberimages)
|
||||
*/
|
||||
#if MagickLibVersion > 0x631
|
||||
static
|
||||
zend_bool s_resize_bounding_box(MagickWand *magick_wand, long box_width, long box_height, zend_bool fill, zend_bool legacy)
|
||||
zend_bool s_resize_bounding_box(MagickWand *magick_wand, im_long box_width, im_long box_height, zend_bool fill, zend_bool legacy)
|
||||
{
|
||||
long new_width, new_height;
|
||||
long extent_x, extent_y;
|
||||
im_long new_width, new_height;
|
||||
im_long extent_x, extent_y;
|
||||
|
||||
/* Calculate dimensions */
|
||||
if (!php_imagick_thumbnail_dimensions(magick_wand, 1, box_width, box_height, &new_width, &new_height, legacy)) {
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ int php_imagick_read_image_using_imagemagick(php_imagick_object *intern, struct
|
||||
{
|
||||
if (type == ImagickReadImage) {
|
||||
if (MagickReadImage(intern->magick_wand, file->filename) == MagickFalse) {
|
||||
struct stat st;
|
||||
zend_stat_t st;
|
||||
/* Resolved to a filename. Check that it's not a dir */
|
||||
if (php_sys_stat(file->absolute_path, &st) == 0 && S_ISDIR(st.st_mode)) {
|
||||
return IMAGICK_RW_PATH_IS_DIR;
|
||||
|
||||
+8
-8
@@ -331,10 +331,10 @@ double *php_imagick_zval_to_double_array(zval *param_array, im_long *num_element
|
||||
return double_array;
|
||||
}
|
||||
|
||||
long *php_imagick_zval_to_long_array(zval *param_array, long *num_elements TSRMLS_DC)
|
||||
im_long *php_imagick_zval_to_long_array(zval *param_array, im_long *num_elements TSRMLS_DC)
|
||||
{
|
||||
long *long_array;
|
||||
long i = 0;
|
||||
im_long *long_array;
|
||||
im_long i = 0;
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval *pzvalue;
|
||||
@@ -348,7 +348,7 @@ long *php_imagick_zval_to_long_array(zval *param_array, long *num_elements TSRML
|
||||
return NULL;
|
||||
}
|
||||
|
||||
long_array = ecalloc(*num_elements, sizeof(long));
|
||||
long_array = ecalloc(*num_elements, sizeof(im_long));
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(param_array), pzvalue) {
|
||||
@@ -362,7 +362,7 @@ long *php_imagick_zval_to_long_array(zval *param_array, long *num_elements TSRML
|
||||
zend_hash_move_forward(Z_ARRVAL_P(param_array)), i++)
|
||||
{
|
||||
zval tmp_zval, *tmp_pzval;
|
||||
long value = 0;
|
||||
im_long value = 0;
|
||||
|
||||
if (Z_TYPE_PP(ppzval) == IS_DOUBLE) {
|
||||
value = Z_LVAL_PP(ppzval);
|
||||
@@ -383,10 +383,10 @@ long *php_imagick_zval_to_long_array(zval *param_array, long *num_elements TSRML
|
||||
return long_array;
|
||||
}
|
||||
|
||||
unsigned char *php_imagick_zval_to_char_array(zval *param_array, long *num_elements TSRMLS_DC)
|
||||
unsigned char *php_imagick_zval_to_char_array(zval *param_array, im_long *num_elements TSRMLS_DC)
|
||||
{
|
||||
unsigned char *char_array;
|
||||
long i = 0;
|
||||
im_long i = 0;
|
||||
|
||||
#ifdef ZEND_ENGINE_3
|
||||
zval *pzvalue;
|
||||
@@ -414,7 +414,7 @@ unsigned char *php_imagick_zval_to_char_array(zval *param_array, long *num_eleme
|
||||
zend_hash_move_forward(Z_ARRVAL_P(param_array)), i++)
|
||||
{
|
||||
zval tmp_zval, *tmp_pzval;
|
||||
long value = 0;
|
||||
im_long value = 0;
|
||||
if (Z_TYPE_PP(ppzval) == IS_DOUBLE) {
|
||||
value = Z_LVAL_PP(ppzval);
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ PointInfo *php_imagick_zval_to_pointinfo_array(zval *coordinate_array, int *num_
|
||||
|
||||
double *php_imagick_zval_to_double_array(zval *param_array, im_long *num_elements TSRMLS_DC);
|
||||
|
||||
long *php_imagick_zval_to_long_array(zval *param_array, long *num_elements TSRMLS_DC);
|
||||
im_long *php_imagick_zval_to_long_array(zval *param_array, im_long *num_elements TSRMLS_DC);
|
||||
|
||||
unsigned char *php_imagick_zval_to_char_array(zval *param_array, long *num_elements TSRMLS_DC);
|
||||
unsigned char *php_imagick_zval_to_char_array(zval *param_array, im_long *num_elements TSRMLS_DC);
|
||||
|
||||
MagickBooleanType php_imagick_progress_monitor(const char *text, const MagickOffsetType offset, const MagickSizeType span, void *client_data);
|
||||
|
||||
@@ -85,4 +85,4 @@ void php_imagick_imagickdraw_rw_fail_to_exception (DrawingWand *drawing_wand, ph
|
||||
*/
|
||||
void php_imagick_throw_exception (php_imagick_class_type_t type, const char *description TSRMLS_DC);
|
||||
|
||||
#endif /* PHP_IMAGICK_HELPERS_H */
|
||||
#endif /* PHP_IMAGICK_HELPERS_H */
|
||||
|
||||
Reference in New Issue
Block a user