summaryrefslogtreecommitdiff
path: root/main/snprintf.c
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-08-11 06:09:46 +0100
committerkrakjoe <joe.watkins@live.co.uk>2014-08-11 06:09:46 +0100
commitdc70139d85cc5476523bfcfbefa44f3ec35e8db5 (patch)
tree7c8fba7f50438bd4a92f8aa8bf85f2c9c8ea9173 /main/snprintf.c
parent4513475a413efe61160dfc8fbb803049a13a9720 (diff)
downloadphp-git-dc70139d85cc5476523bfcfbefa44f3ec35e8db5.tar.gz
update zend_make_printable_zval to take TSRM context
Diffstat (limited to 'main/snprintf.c')
-rw-r--r--main/snprintf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/snprintf.c b/main/snprintf.c
index f26206d851..914cac7133 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -781,9 +781,10 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
* It is reset to ' ' by non-numeric formats
*/
switch (*fmt) {
- case 'Z':
- zvp = (zval*) va_arg(ap, zval*);
- free_zcopy = zend_make_printable_zval(zvp, &zcopy);
+ case 'Z': {
+ TSRMLS_FETCH();
+ zvp = (zval*) va_arg(ap, zval*);
+ free_zcopy = zend_make_printable_zval(zvp, &zcopy TSRMLS_CC);
if (free_zcopy) {
zvp = &zcopy;
}
@@ -791,8 +792,9 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) /
s = Z_STRVAL_P(zvp);
if (adjust_precision && precision < s_len) {
s_len = precision;
- }
+ }
break;
+ }
case 'u':
switch(modifier) {
default: