Date: 12/04/00
- Next message: yusufg <email protected>: "[PHP-DEV] PHP 4.0 Bug #8090: Warnings whilst running buildconf"
- Previous message: Alan Halachmi: "[PHP-DEV] Re: PHP 4.0 Bug #7880 Updated: PHP_URL_FOPEN doesn't work"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] Adding LC_* constants to PHP?"
- Reply: Sascha Schumann: "Re: [PHP-DEV] Adding LC_* constants to PHP?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I would like to add a set of constants for the LC_* values to the gettext.c
file. Doing this would allow people using the dcgettext function (all one
or two of us ;) to use a constant, instead of a numeric value for the
category argument of the function.
Can anyone see a down side to doing this?
As I understand it, I would need to add the following code to gettext.c:
PHP_MINIT_FUNCTION(gettext)
{
REGISTER_LONG_CONSTANT("LC_CTYPE", LC_CTYPE, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_NUMERIC", LC_NUMERIC, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_TIME", LC_TIME, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_COLLATE", LC_COLLATE, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_MONETARY", LC_MONETARY, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_MESSAGES", LC_MESSAGES, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("LC_ALL", LC_ALL, CONST_CS | CONST_PERSISTENT);
return SUCCESS; // I am not sure if this is needed...
}
The LC_* constants used to set the values for the analogous PHP constants
should already be available from locale.h (which is included by libintl.h)
Any comments or suggestions?
--zak
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: yusufg <email protected>: "[PHP-DEV] PHP 4.0 Bug #8090: Warnings whilst running buildconf"
- Previous message: Alan Halachmi: "[PHP-DEV] Re: PHP 4.0 Bug #7880 Updated: PHP_URL_FOPEN doesn't work"
- Next in thread: Sascha Schumann: "Re: [PHP-DEV] Adding LC_* constants to PHP?"
- Reply: Sascha Schumann: "Re: [PHP-DEV] Adding LC_* constants to PHP?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

