diff options
author | Anatol Belski <ab@php.net> | 2014-10-15 09:37:55 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-15 09:37:55 +0200 |
commit | c00424e427930a33e6d8645cc3f23fb78ed29b9f (patch) | |
tree | 83190e6ac9d0714fc971fe0925a0d935414de91c /ext/gd/gd_ctx.c | |
parent | 382f95e6127d52b079d172ccd017cf306402e015 (diff) | |
download | php-git-c00424e427930a33e6d8645cc3f23fb78ed29b9f.tar.gz |
bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
Diffstat (limited to 'ext/gd/gd_ctx.c')
-rw-r--r-- | ext/gd/gd_ctx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 73f4848eeb..0b79cb6f0d 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -29,11 +29,13 @@ static void _php_image_output_putc(struct gdIOCtx *ctx, int c) /* {{{ */ * big endian architectures: */ unsigned char ch = (unsigned char) c; + TSRMLS_FETCH(); php_write(&ch, 1 TSRMLS_CC); } /* }}} */ static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ { + TSRMLS_FETCH(); return php_write((void *)buf, l TSRMLS_CC); } /* }}} */ @@ -47,19 +49,21 @@ static void _php_image_output_ctxfree(struct gdIOCtx *ctx) /* {{{ */ static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) /* {{{ */ { char ch = (char) c; php_stream * stream = (php_stream *)ctx->data; - + TSRMLS_FETCH(); php_stream_write(stream, &ch, 1); } /* }}} */ static int _php_image_stream_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ { php_stream * stream = (php_stream *)ctx->data; - + TSRMLS_FETCH(); return php_stream_write(stream, (void *)buf, l); } /* }}} */ static void _php_image_stream_ctxfree(struct gdIOCtx *ctx) /* {{{ */ { + TSRMLS_FETCH(); + if(ctx->data) { php_stream_close((php_stream *) ctx->data); ctx->data = NULL; |