cvs: php4 /ext/gd gd.c
| From: | Rasmus Lerdorf | Date: | Fri, 22 Nov 2002 23:25:14 +0000 |
| Subject: | cvs: php4 /ext/gd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16565@lists.php.net to get a copy of this message | ||
rasmus Fri Nov 22 18:25:14 2002 EDT
Modified files:
/php4/ext/gd gd.c
Log:
Applied imagedeallocate() fix
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.223 php4/ext/gd/gd.c:1.224
--- php4/ext/gd/gd.c:1.223 Thu Nov 14 10:09:53 2002
+++ php4/ext/gd/gd.c Fri Nov 22 18:25:14 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.223 2002/11/14 15:09:53 helly Exp $ */
+/* $Id: gd.c,v 1.224 2002/11/22 23:25:14 rasmus Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1866,6 +1866,13 @@
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
+
+ #if HAVE_LIBGD20
+ /* We can return right away for a truecolor image as deallocating colours is meaningless here */
+ if (gdImageTrueColor(im)) {
+ RETURN_TRUE;
+ }
+ #endif
convert_to_long_ex(index);
col = Z_LVAL_PP(index);