From: Rasmus Lerdorf Date: Fri, 14 Jul 2000 22:07:57 +0000 (+0000) Subject: Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~270 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c10e038e211c9d067829e8abbbeac72e326958d;p=php Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for imagetypes() function @ Add IMG_GIF, IMG_JPG, IMG_JPEG, IMG_PNG and IMG_WBMP constants for @ imagetypes() function (Rasmus) --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d0bc3408aa..70f06af445 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -215,6 +215,11 @@ PHP_MINIT_FUNCTION(gd) GDG(le_ps_font) = register_list_destructors(php_free_ps_font, NULL); GDG(le_ps_enc) = register_list_destructors(php_free_ps_enc, NULL); #endif + REGISTER_LONG_CONSTANT("IMG_GIF", 1, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMG_JPG", 2, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMG_JPEG", 2, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMG_PNG", 4, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("IMG_WBMP", 8, CONST_CS | CONST_PERSISTENT); return SUCCESS; }