From: foobar Date: Thu, 27 Jun 2002 23:05:11 +0000 (+0000) Subject: Consistency fix. X-Git-Tag: php-4.3.0dev_zend2_alpha2~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f2c1d8093bddfa6dcebb5f5b7700d4e8a29e360;p=php Consistency fix. --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 72d6fa7ce8..53bb3f38be 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -113,6 +113,7 @@ function_entry gd_functions[] = { PHP_FE(imagecolorallocate, NULL) #if HAVE_LIBGD15 PHP_FE(imagepalettecopy, NULL) + PHP_FE(imagecreatefromstring, NULL) #endif PHP_FE(imagecolorat, NULL) PHP_FE(imagecolorclosest, NULL) @@ -156,7 +157,6 @@ function_entry gd_functions[] = { PHP_FE(imagesetstyle, NULL) - PHP_FE(imagecreatefromstring, NULL) #ifdef HAVE_GD_PNG PHP_FE(imagecreatefrompng, NULL) #endif @@ -994,11 +994,11 @@ static int _php_image_type (char data[8]) } /* }}} */ +#ifdef HAVE_LIBGD15 /* {{{ _php_image_create_from_string */ gdImagePtr _php_image_create_from_string(zval **data, char *tn, gdImagePtr (*ioctx_func_p)() TSRMLS_DC) { -#ifdef HAVE_LIBGD15 gdImagePtr im; gdIOCtx *io_ctx; @@ -1015,9 +1015,6 @@ gdImagePtr _php_image_create_from_string(zval **data, char *tn, gdImagePtr (*ioc } return im; -#else - return NULL; -#endif } /* }}} */ @@ -1025,7 +1022,6 @@ gdImagePtr _php_image_create_from_string(zval **data, char *tn, gdImagePtr (*ioc Create a new image from the image stream in the string */ PHP_FUNCTION(imagecreatefromstring) { -#ifdef HAVE_LIBGD15 zval **data; gdImagePtr im; int imtype; @@ -1097,11 +1093,9 @@ PHP_FUNCTION(imagecreatefromstring) } ZEND_REGISTER_RESOURCE(return_value, im, le_gd); -#else - php_error(E_WARNING, "ImageCreateFromString: Only available with GD 1.5+"); -#endif } /* }}} */ +#endif /* {{{ _php_image_create_from */