From: foobar Date: Mon, 30 Jul 2001 20:27:11 +0000 (+0000) Subject: Make this extension compile in ZTS mode. Also killed 2 compile warnings. X-Git-Tag: PRE_ENGINE2_SPLIT~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75e835017ad4497d51127e034543c5f1d6536d18;p=php Make this extension compile in ZTS mode. Also killed 2 compile warnings. --- 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; }