diff options
| author | Piotr Pawłow <pp@siedziba.pl> | 2016-09-23 02:43:00 +0200 |
|---|---|---|
| committer | Piotr Pawłow <pp@siedziba.pl> | 2016-09-23 02:43:00 +0200 |
| commit | 86f18145b0870f07b68dc7f0f44a1a86b79a9a65 (patch) | |
| tree | fcc22c6d1f3bb7debeed864d2b4f232b232eba13 /php_imlib.c | |
| parent | 866b2d740e6f01aeff24598928fe385f180e0c96 (diff) | |
Port _php_handle_cliprect_array function.
Diffstat (limited to 'php_imlib.c')
| -rw-r--r-- | php_imlib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/php_imlib.c b/php_imlib.c index c1164a3..84f6a9a 100644 --- a/php_imlib.c +++ b/php_imlib.c @@ -831,7 +831,7 @@ PHP_MINFO_FUNCTION(imlib) static int _php_handle_cliprect_array(zval **dbox, char *func_name, int *x, int *y, int *w, int *h TSRMLS_DC) { - zval **element, ***box_coords; + zval *element, **box_coords; int i,arrcount; HashTable *box; @@ -848,20 +848,20 @@ static int _php_handle_cliprect_array(zval **dbox, char *func_name, return 0; } - box_coords = (zval ***)emalloc(arrcount * sizeof(zval **)); + box_coords = (zval **)emalloc(arrcount * sizeof(zval *)); for (i = 0; i < arrcount; i++) { - if (zend_hash_index_find(box, i, (void **)&element) == SUCCESS) + if (element = zend_hash_index_find(box, i)) { convert_to_long_ex(element); box_coords[i] = element; } } - *x = Z_LVAL_PP(box_coords[0]); - *y = Z_LVAL_PP(box_coords[1]); - *w = Z_LVAL_PP(box_coords[2]); - *h = Z_LVAL_PP(box_coords[3]); + *x = Z_LVAL_P(box_coords[0]); + *y = Z_LVAL_P(box_coords[1]); + *w = Z_LVAL_P(box_coords[2]); + *h = Z_LVAL_P(box_coords[3]); efree(box_coords); return 1; |
