On Sun, Nov 24, 2013 at 10:10 PM, Anatol Belski <[email protected]> wrote:
> Commit: d8c7d69543c8cc0609facb2d35e636cb59c38385
> Author: Anatol Belski <[email protected]> Sun, 24 Nov 2013 22:10:57
> +0100
> Parents: 08bbd2b5101006eabc932a6076417336ebcaf889
> Branches: str_size_and_int64
>
> Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=d8c7d69543c8cc0609facb2d35e636cb59c38385
>
> Log:
> printf int format fixes
>
> Changed paths:
> M Zend/zend_API.c
> M Zend/zend_builtin_functions.c
> M Zend/zend_exceptions.c
> M Zend/zend_execute.c
> M Zend/zend_operators.c
>
>
> Diff:
> diff --git a/Zend/zend_API.c b/Zend/zend_API.c
> index 869f1a5..912f0e3 100644
> --- a/Zend/zend_API.c
> +++ b/Zend/zend_API.c
> @@ -1580,7 +1580,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval
> *key, zval *value) /* {{{ */
> result = zend_symtable_update(ht, "", 1, &value,
> sizeof(zval *), NULL);
> break;
> case IS_RESOURCE:
> - zend_error(E_STRICT, "Resource ID#%ld used as
> offset, casting to integer (%ld)", Z_LVAL_P(key), Z_LVAL_P(key));
> + zend_error(E_STRICT, "Resource ID#" ZEND_INT_FMT "
> used as offset, casting to integer (" ZEND_INT_FMT ")", Z_LVAL_P(key),
> Z_LVAL_P(key));
> /* break missing intentionally */
>
Replacing "%ld" with "ZEND_INT_FMT" everywhere seems a bit awkward. Why not
add modifiers for this directly to our printf functions?
Nikita