diff options
author | foobar <sniper@php.net> | 2001-07-30 20:27:11 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2001-07-30 20:27:11 +0000 |
commit | 75e835017ad4497d51127e034543c5f1d6536d18 (patch) | |
tree | ac809ac5c14275d6ba3c1d3487815c2ddcdfb460 | |
parent | 6ee8e4bcccfba2e31fe6d951c92b135f6c5580a6 (diff) | |
download | php-git-75e835017ad4497d51127e034543c5f1d6536d18.tar.gz |
Make this extension compile in ZTS mode. Also killed 2 compile warnings.
-rw-r--r-- | ext/gd/gd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 0989e83ec5..77ff9735f8 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2167,7 +2167,8 @@ static gdFontPtr php_find_gd_font(int size) { gdFontPtr font; int ind_type; - + TSRMLS_FETCH(); + switch (size) { case 1: font = gdFontTiny; @@ -3151,7 +3152,7 @@ PHP_FUNCTION(imagepsbbox) { #if HAVE_LIBT1 zval **str, **fnt, **sz, **sp, **wd, **ang; - int i, space, add_width, char_width, amount_kern; + int i, space, add_width = 0, char_width, amount_kern; int cur_x, cur_y, dx, dy; int x1, y1, x2, y2, x3, y3, x4, y4; int *f_ind; @@ -3316,7 +3317,8 @@ static void _php_image_bw_convert( gdImagePtr im_org, gdIOCtx *out, int threshol int dest_height = gdImageSY (im_org); int dest_width = gdImageSX (im_org); int x,y; - + TSRMLS_FETCH(); + im_dest = gdImageCreate (dest_width, dest_height); if (im_dest == NULL) { php_error (E_WARNING, "%s: unable to allocate temporary buffer", get_active_function_name(TSRMLS_C)); @@ -3458,6 +3460,7 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) default: php_error(E_WARNING, "%s: Format not supported", get_active_function_name(TSRMLS_C)); + RETURN_FALSE; break; } |