[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-04-03 Thread Pierre-Alain Joye
pajoye  Wed Apr  4 01:58:24 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h 
  Log:
  - MFH: don't declare MSHUTDOWN if both cachesetup and t1lib are not used
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.16&r2=1.312.2.20.2.17&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.16 php-src/ext/gd/gd.c:1.312.2.20.2.17
--- php-src/ext/gd/gd.c:1.312.2.20.2.16 Wed Apr  4 00:47:55 2007
+++ php-src/ext/gd/gd.c Wed Apr  4 01:58:24 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.16 2007/04/04 00:47:55 pajoye Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.17 2007/04/04 01:58:24 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1147,7 +1147,11 @@
"gd",
gd_functions,
PHP_MINIT(gd),
+#if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
PHP_MSHUTDOWN(gd),
+#else
+   NULL,
+#endif
NULL,
 #if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || 
HAVE_GD_FREEFONTCACHE)
PHP_RSHUTDOWN(gd),
@@ -1194,6 +1198,7 @@
 
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
+#if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
 PHP_MSHUTDOWN_FUNCTION(gd)
 {
 #if HAVE_LIBT1
@@ -1204,6 +1209,7 @@
 #endif
return SUCCESS;
 }
+#endif
 /* }}} */
 
 
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.3&r2=1.59.2.3.2.4&diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.3 
php-src/ext/gd/php_gd.h:1.59.2.3.2.4
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.3Wed Apr  4 00:47:55 2007
+++ php-src/ext/gd/php_gd.h Wed Apr  4 01:58:24 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.3 2007/04/04 00:47:55 pajoye Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.4 2007/04/04 01:58:24 pajoye Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -66,7 +66,9 @@
 /* gd.c functions */
 PHP_MINFO_FUNCTION(gd);
 PHP_MINIT_FUNCTION(gd);
+#if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
 PHP_MSHUTDOWN_FUNCTION(gd);
+#endif
 #if HAVE_LIBGD20 && HAVE_GD_STRINGFT
 PHP_RSHUTDOWN_FUNCTION(gd);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Pierre

On 1/9/07, Nuno Lopes <[EMAIL PROTECTED]> wrote:

> On Mon, 8 Jan 2007, Nuno Lopes wrote:
>
>> nlopess Mon Jan  8 22:52:23 2007 UTC
>>
>>   Modified files:  (Branch: PHP_5_2)
>> /php-src/ext/gd gd.c php_gd.h
>>   Log:
>>   avoid calling MSHUTDOWN when built without libt1
>
> Is it really needed to clog the source code with those ifdefs? It's not
> like this is a performance issue here...

I don't think this is "clogging" the code. I also think that any "free"
speedup is welcome (even minor). Anyway this part of the code is rarely
changed, so it shouldn't be any nightmare to maintain. (the ifdef was
already there. I just moved it around)


As I said, I have no real problem with such changes. I just feel like
they should not be done in a RC phase. Cleanup or "speedup" are
otherwise welcome :)

--Pierre

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Nuno Lopes

On Mon, 8 Jan 2007, Nuno Lopes wrote:


nlopess Mon Jan  8 22:52:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h
  Log:
  avoid calling MSHUTDOWN when built without libt1


Is it really needed to clog the source code with those ifdefs? It's not
like this is a performance issue here...


I don't think this is "clogging" the code. I also think that any "free" 
speedup is welcome (even minor). Anyway this part of the code is rarely 
changed, so it shouldn't be any nightmare to maintain. (the ifdef was 
already there. I just moved it around)


Nuno 


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Pierre

Hello,

On 1/8/07, Derick Rethans <[EMAIL PROTECTED]> wrote:

On Mon, 8 Jan 2007, Nuno Lopes wrote:

> nlopess   Mon Jan  8 22:52:23 2007 UTC
>
>   Modified files:  (Branch: PHP_5_2)
> /php-src/ext/gd   gd.c php_gd.h
>   Log:
>   avoid calling MSHUTDOWN when built without libt1

Is it really needed to clog the source code with those ifdefs? It's not
like this is a performance issue here...


I agree. There is no issue to fix :)

That being said, I'm not sure such changes are welcome during the RC
phase. Please try to commit such changes after 5.2.1.

--Pierre

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Derick Rethans
On Mon, 8 Jan 2007, Nuno Lopes wrote:

> nlopess   Mon Jan  8 22:52:23 2007 UTC
> 
>   Modified files:  (Branch: PHP_5_2)
> /php-src/ext/gd   gd.c php_gd.h 
>   Log:
>   avoid calling MSHUTDOWN when built without libt1

Is it really needed to clog the source code with those ifdefs? It's not 
like this is a performance issue here...

regards,
Derick


>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.13&r2=1.312.2.20.2.14&diff_format=u
> Index: php-src/ext/gd/gd.c
> diff -u php-src/ext/gd/gd.c:1.312.2.20.2.13 
> php-src/ext/gd/gd.c:1.312.2.20.2.14
> --- php-src/ext/gd/gd.c:1.312.2.20.2.13   Fri Jan  5 15:06:55 2007
> +++ php-src/ext/gd/gd.c   Mon Jan  8 22:52:22 2007
> @@ -18,7 +18,7 @@
> +--+
>   */
>  
> -/* $Id: gd.c,v 1.312.2.20.2.13 2007/01/05 15:06:55 iliaa Exp $ */
> +/* $Id: gd.c,v 1.312.2.20.2.14 2007/01/08 22:52:22 nlopess Exp $ */
>  
>  /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
> Cold Spring Harbor Labs. */
> @@ -1147,7 +1147,11 @@
>   "gd",
>   gd_functions,
>   PHP_MINIT(gd),
> +#if HAVE_LIBT1
>   PHP_MSHUTDOWN(gd),
> +#else
> + NULL,
> +#endif
>   NULL,
>  #if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || 
> HAVE_GD_FREEFONTCACHE)
>   PHP_RSHUTDOWN(gd),
> @@ -1191,16 +1195,16 @@
>  }
>  /* }}} */
>  
> +#if HAVE_LIBT1
>  /* {{{ PHP_MSHUTDOWN_FUNCTION
>   */
>  PHP_MSHUTDOWN_FUNCTION(gd)
>  {
> -#if HAVE_LIBT1
>   T1_CloseLib();
> -#endif
>   return SUCCESS;
>  }
>  /* }}} */
> +#endif
>  
>  
>  /* {{{ PHP_MINIT_FUNCTION
> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.1&r2=1.59.2.3.2.2&diff_format=u
> Index: php-src/ext/gd/php_gd.h
> diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.1 
> php-src/ext/gd/php_gd.h:1.59.2.3.2.2
> --- php-src/ext/gd/php_gd.h:1.59.2.3.2.1  Mon Jan  1 09:36:01 2007
> +++ php-src/ext/gd/php_gd.h   Mon Jan  8 22:52:22 2007
> @@ -17,7 +17,7 @@
> +--+
>  */
>  
> -/* $Id: php_gd.h,v 1.59.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
> +/* $Id: php_gd.h,v 1.59.2.3.2.2 2007/01/08 22:52:22 nlopess Exp $ */
>  
>  #ifndef PHP_GD_H
>  #define PHP_GD_H
> @@ -66,7 +66,9 @@
>  /* gd.c functions */
>  PHP_MINFO_FUNCTION(gd);
>  PHP_MINIT_FUNCTION(gd);
> +#if HAVE_LIBT1
>  PHP_MSHUTDOWN_FUNCTION(gd);
> +#endif
>  #if HAVE_LIBGD20 && HAVE_GD_STRINGFT
>  PHP_RSHUTDOWN_FUNCTION(gd);
>  #endif
> 
> 

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c php_gd.h

2007-01-08 Thread Nuno Lopes
nlopess Mon Jan  8 22:52:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h 
  Log:
  avoid calling MSHUTDOWN when built without libt1
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.13&r2=1.312.2.20.2.14&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.13 php-src/ext/gd/gd.c:1.312.2.20.2.14
--- php-src/ext/gd/gd.c:1.312.2.20.2.13 Fri Jan  5 15:06:55 2007
+++ php-src/ext/gd/gd.c Mon Jan  8 22:52:22 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.13 2007/01/05 15:06:55 iliaa Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.14 2007/01/08 22:52:22 nlopess Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1147,7 +1147,11 @@
"gd",
gd_functions,
PHP_MINIT(gd),
+#if HAVE_LIBT1
PHP_MSHUTDOWN(gd),
+#else
+   NULL,
+#endif
NULL,
 #if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_GD_FONTCACHESHUTDOWN || 
HAVE_GD_FREEFONTCACHE)
PHP_RSHUTDOWN(gd),
@@ -1191,16 +1195,16 @@
 }
 /* }}} */
 
+#if HAVE_LIBT1
 /* {{{ PHP_MSHUTDOWN_FUNCTION
  */
 PHP_MSHUTDOWN_FUNCTION(gd)
 {
-#if HAVE_LIBT1
T1_CloseLib();
-#endif
return SUCCESS;
 }
 /* }}} */
+#endif
 
 
 /* {{{ PHP_MINIT_FUNCTION
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/php_gd.h?r1=1.59.2.3.2.1&r2=1.59.2.3.2.2&diff_format=u
Index: php-src/ext/gd/php_gd.h
diff -u php-src/ext/gd/php_gd.h:1.59.2.3.2.1 
php-src/ext/gd/php_gd.h:1.59.2.3.2.2
--- php-src/ext/gd/php_gd.h:1.59.2.3.2.1Mon Jan  1 09:36:01 2007
+++ php-src/ext/gd/php_gd.h Mon Jan  8 22:52:22 2007
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_gd.h,v 1.59.2.3.2.1 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: php_gd.h,v 1.59.2.3.2.2 2007/01/08 22:52:22 nlopess Exp $ */
 
 #ifndef PHP_GD_H
 #define PHP_GD_H
@@ -66,7 +66,9 @@
 /* gd.c functions */
 PHP_MINFO_FUNCTION(gd);
 PHP_MINIT_FUNCTION(gd);
+#if HAVE_LIBT1
 PHP_MSHUTDOWN_FUNCTION(gd);
+#endif
 #if HAVE_LIBGD20 && HAVE_GD_STRINGFT
 PHP_RSHUTDOWN_FUNCTION(gd);
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php