[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sat Jan 26 01:31:35 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2938r2=1.2939diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2938 php-src/ChangeLog:1.2939 --- php-src/ChangeLog:1.2938Fri Jan 25 01:31:32 2008 +++ php-src/ChangeLog Sat Jan 26 01:31:34 2008 @@ -1,3 +1,181 @@ +2008-01-25 Nuno Lopes [EMAIL PROTECTED] + +* (PHP_5_3) + ext/spl/php_spl.c + ext/spl/php_spl.h + ext/tidy/php_tidy.h + ext/tidy/tidy.c: + more const kewywording + remove spl_functions_none var (wast used anywhere + +* ext/ereg/regex/cclass.h + ext/ereg/regex/regerror.c + ext/filter/filter.c + ext/spl/php_spl.c + ext/spl/php_spl.h + ext/tidy/php_tidy.h + ext/tidy/tidy.c: + MFB: const keywording + +* (PHP_5_3) + ext/filter/filter.c: + const more 216 bytes (on a 32-bits host) + +* (PHP_5_3) + ext/ereg/regex/cclass.h + ext/ereg/regex/regerror.c: + const'ify more 372 bytes + +* ext/ereg/regex/cname.h: + MFB: const'ify + +* (PHP_5_3) + ext/ereg/regex/cname.h: + const'ify more 768 bytes + +* ext/pdo/pdo_sqlstate.c: + MFB: move data to const segment + +* (PHP_5_3) + ext/pdo/pdo_sqlstate.c: + move about 3K of data to the const area. also reduce memory usage (~ -266 + bytes :P) + +* ext/pcre/php_pcre.c + ext/pcre/php_pcre.c + ext/pcre/php_pcre.h + ext/pcre/php_pcre.h: + spread some static keywords + +2008-01-25 Scott MacVicar [EMAIL PROTECTED] + +* ext/standard/html.c: + MFB: Fix html_entity_decode when converting numeric html entities, the + numeric values for the extended character set don't correspond to that of + windows-1251 and cp866. + +* (PHP_5_3) + NEWS + ext/standard/html.c: + Fix html_entity_decode when converting numeric html entities, the numeric + values for the extended characters don't correspond to that of + windows-1251 and cp866. + +2008-01-25 Rob Richards [EMAIL PROTECTED] + +* (PHP_5_3) + ext/dom/dom_fe.h + ext/dom/php_dom.c + ext/dom/php_dom.h + ext/dom/xpath.c + ext/dom/tests/domxpath.phpt: + backport functionality to call user functions within XPath + add test + +* ext/mysqlnd/mysqlnd_result.c: + fix win32 compile + +* ext/standard/array.c: + fix zts build + +2008-01-25 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_3) + ext/standard/array.c: + MFH: endless loop (and stack overflow) protection in compact() + +* ext/standard/array.c: + endless loop (and stack overflow) protection in compact() + +2008-01-25 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_3) + ext/standard/string.c: + + Adjust new chr() param handling to address chr() calls + +2008-01-25 Robert Nicholson [EMAIL PROTECTED] + +* ext/standard/tests/array/array_shuffle_basic.phpt + ext/standard/tests/array/array_shuffle_basic.phpt: + - Add a basic test for array_shuffle() + +* ext/standard/tests/array/array_shuffle_basic.phpt + ext/standard/tests/array/array_shuffle_basic.phpt + ext/standard/tests/array/array_shuffle_basic.phpt: +1.1.4; + file array_shuffle_basic.phpt was initially added on branch PHP_5_2. + +* ext/standard/tests/array/array_diff_key_basic.phpt + ext/standard/tests/array/array_diff_key_basic.phpt + ext/standard/tests/array/array_diff_key_variation1.phpt + ext/standard/tests/array/array_diff_key_variation1.phpt + ext/standard/tests/array/array_diff_uassoc_basic.phpt + ext/standard/tests/array/array_diff_uassoc_basic.phpt + ext/standard/tests/array/array_diff_ukey_basic.phpt + ext/standard/tests/array/array_diff_ukey_basic.phpt + ext/standard/tests/array/array_intersect_key_basic.phpt + ext/standard/tests/array/array_intersect_key_basic.phpt + ext/standard/tests/array/array_intersect_uassoc_basic.phpt + ext/standard/tests/array/array_intersect_uassoc_basic.phpt + ext/standard/tests/array/array_intersect_ukey_basic.phpt + ext/standard/tests/array/array_intersect_ukey_basic.phpt + ext/standard/tests/array/array_udiff_assoc_basic.phpt + ext/standard/tests/array/array_udiff_assoc_basic.phpt + ext/standard/tests/array/array_udiff_basic.phpt + ext/standard/tests/array/array_udiff_basic.phpt + ext/standard/tests/array/array_udiff_uassoc_basic.phpt + ext/standard/tests/array/array_udiff_uassoc_basic.phpt + ext/standard/tests/array/array_uintersect_assoc_basic.phpt + ext/standard/tests/array/array_uintersect_assoc_basic.phpt + ext/standard/tests/array/array_uintersect_basic.phpt + ext/standard/tests/array/array_uintersect_basic.phpt + ext/standard/tests/array/array_uintersect_uassoc_basic.phpt +
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard string.c
Ilia, the tests are still broken. On 25.01.2008 04:31, Ilia Alshanetsky wrote: iliaa Fri Jan 25 01:31:11 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard string.c Log: Adjust new chr() param handling to address chr() calls http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.12r2=1.445.2.14.2.69.2.13diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.12 php-src/ext/standard/string.c:1.445.2.14.2.69.2.13 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.12Tue Jan 22 01:34:24 2008 +++ php-src/ext/standard/string.c Fri Jan 25 01:31:10 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.12 2008/01/22 01:34:24 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.13 2008/01/25 01:31:10 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2604,9 +2604,14 @@ long c; char temp[2]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, c) == FAILURE) { - return; + if (ZEND_NUM_ARGS() != 1) { + WRONG_PARAM_COUNT; } + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, l, c) == FAILURE) { + c = 0; + } + temp[0] = (char)c; temp[1] = '\0'; -- Wbr, Antony Dovgal -- 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_3) /ext/standard string.c
On Jan 25, 2008 2:31 AM, Ilia Alshanetsky [EMAIL PROTECTED] wrote: iliaa Fri Jan 25 01:31:11 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard string.c Log: Adjust new chr() param handling to address chr() calls http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.12r2=1.445.2.14.2.69.2.13diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.12 php-src/ext/standard/string.c:1.445.2.14.2.69.2.13 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.12 Tue Jan 22 01:34:24 2008 +++ php-src/ext/standard/string.c Fri Jan 25 01:31:10 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.12 2008/01/22 01:34:24 iliaa Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.13 2008/01/25 01:31:10 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2604,9 +2604,14 @@ long c; char temp[2]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, c) == FAILURE) { - return; + if (ZEND_NUM_ARGS() != 1) { + WRONG_PARAM_COUNT; } + + if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, l, c) == FAILURE) { + c = 0; + } This definitely looks wrong. If I pass an object or whatever it won't throw any errors. -Hannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo pdo_sqlstate.c
nlopess Fri Jan 25 19:58:51 2008 UTC Modified files: /php-src/ext/pdopdo_sqlstate.c Log: MFB: move data to const segment http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sqlstate.c?r1=1.11r2=1.12diff_format=u Index: php-src/ext/pdo/pdo_sqlstate.c diff -u php-src/ext/pdo/pdo_sqlstate.c:1.11 php-src/ext/pdo/pdo_sqlstate.c:1.12 --- php-src/ext/pdo/pdo_sqlstate.c:1.11 Mon Dec 31 07:12:13 2007 +++ php-src/ext/pdo/pdo_sqlstate.c Fri Jan 25 19:58:51 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pdo_sqlstate.c,v 1.11 2007/12/31 07:12:13 sebastian Exp $ */ +/* $Id: pdo_sqlstate.c,v 1.12 2008/01/25 19:58:51 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -29,13 +29,13 @@ #include php_pdo_driver.h struct pdo_sqlstate_info { - char state[6]; + const char state[5]; const char *desc; }; static HashTable err_hash; -static struct pdo_sqlstate_info err_initializer[] = { +static const struct pdo_sqlstate_info err_initializer[] = { { 0, No error }, { 01000, Warning }, { 01001, Cursor operation conflict }, @@ -312,7 +312,7 @@ int pdo_sqlstate_init_error_table(void) { int i; - struct pdo_sqlstate_info *info; + const struct pdo_sqlstate_info *info; if (FAILURE == zend_hash_init(err_hash, sizeof(err_initializer)/sizeof(err_initializer[0]), NULL, NULL, 1)) { @@ -330,7 +330,7 @@ const char *pdo_sqlstate_state_to_description(char *state) { - struct pdo_sqlstate_info **info; + const struct pdo_sqlstate_info **info; if (SUCCESS == zend_hash_find(err_hash, state, sizeof(err_initializer[0].state), (void**)info)) { return (*info)-desc; -- 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_3) /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c
On 25.01.2008 23:29, Nuno Lopes wrote: -zend_module_entry spl_module_entry = { +const zend_module_entry spl_module_entry = { -zend_module_entry tidy_module_entry = { +const zend_module_entry tidy_module_entry = { This makes PHP to crash right after the start. Please revert. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/ereg/regex cclass.h regerror.c
nlopess Fri Jan 25 20:11:53 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ereg/regex cclass.h regerror.c Log: const'ify more 372 bytes http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/cclass.h?r1=1.4.8.2r2=1.4.8.3diff_format=u Index: php-src/ext/ereg/regex/cclass.h diff -u php-src/ext/ereg/regex/cclass.h:1.4.8.2 php-src/ext/ereg/regex/cclass.h:1.4.8.3 --- php-src/ext/ereg/regex/cclass.h:1.4.8.2 Fri Oct 5 15:00:06 2007 +++ php-src/ext/ereg/regex/cclass.h Fri Jan 25 20:11:53 2008 @@ -1,8 +1,8 @@ /* character-class table */ -static struct cclass { - unsigned char *name; - unsigned char *chars; - unsigned char *multis; +static const struct cclass { + const unsigned char *name; + const unsigned char *chars; + const unsigned char *multis; } cclasses[] = { {alnum, ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789, }, {alpha, ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz, http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regerror.c?r1=1.6.6.3r2=1.6.6.4diff_format=u Index: php-src/ext/ereg/regex/regerror.c diff -u php-src/ext/ereg/regex/regerror.c:1.6.6.3 php-src/ext/ereg/regex/regerror.c:1.6.6.4 --- php-src/ext/ereg/regex/regerror.c:1.6.6.3 Thu Jan 24 23:02:07 2008 +++ php-src/ext/ereg/regex/regerror.c Fri Jan 25 20:11:53 2008 @@ -30,10 +30,10 @@ = #define REG_ATOI255 // convert name to number (!) = #define REG_ITOA0400// convert number to name (!) */ -static struct rerr { +static const struct rerr { int code; - char *name; - char *explain; + const char *name; + const char *explain; } rerrs[] = { {REG_OKAY, REG_OKAY, no errors detected}, {REG_NOMATCH, REG_NOMATCH, regexec() failed to match}, @@ -67,10 +67,10 @@ char *errbuf, size_t errbuf_size) { - register struct rerr *r; + register const struct rerr *r; register size_t len; register int target = errcode ~ REG_ITOA; - register char *s; + register const char *s; char convbuf[50]; if (errcode == REG_ATOI) @@ -113,7 +113,7 @@ const regex_t *preg; char *localbuf; { - register struct rerr *r; + register const struct rerr *r; for (r = rerrs; r-code = 0; r++) if (strcmp(r-name, preg-re_endp) == 0) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c
nlopess Fri Jan 25 20:29:48 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splphp_spl.c php_spl.h /php-src/ext/tidy php_tidy.h tidy.c Log: more const kewywording remove spl_functions_none var (wast used anywhere http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.17.2.7r2=1.52.2.28.2.17.2.8diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.7 php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.8 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.17.2.7Tue Jan 15 09:38:15 2008 +++ php-src/ext/spl/php_spl.c Fri Jan 25 20:29:48 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.17.2.7 2008/01/15 09:38:15 colder Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.17.2.8 2008/01/25 20:29:48 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -48,13 +48,6 @@ #define SPL_DEFAULT_FILE_EXTENSIONS .inc,.php -/* {{{ spl_functions_none - */ -const zend_function_entry spl_functions_none[] = { - {NULL, NULL, NULL} -}; -/* }}} */ - /* {{{ PHP_GINIT_FUNCTION */ static PHP_GINIT_FUNCTION(spl) @@ -771,7 +764,7 @@ /* {{{ spl_module_entry */ -zend_module_entry spl_module_entry = { +const zend_module_entry spl_module_entry = { #ifdef HAVE_SIMPLEXML STANDARD_MODULE_HEADER_EX, NULL, spl_deps, http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.17.2.1.2.3.2.2r2=1.17.2.1.2.3.2.3diff_format=u Index: php-src/ext/spl/php_spl.h diff -u php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.2 php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.3 --- php-src/ext/spl/php_spl.h:1.17.2.1.2.3.2.2 Mon Dec 31 07:17:14 2007 +++ php-src/ext/spl/php_spl.h Fri Jan 25 20:29:48 2008 @@ -28,7 +28,7 @@ #define SPL_DEBUG(x) #endif -extern zend_module_entry spl_module_entry; +extern const zend_module_entry spl_module_entry; #define phpext_spl_ptr spl_module_entry #ifdef PHP_WIN32 http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.26.2.1.2.5.2.1r2=1.26.2.1.2.5.2.2diff_format=u Index: php-src/ext/tidy/php_tidy.h diff -u php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.1 php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.2 --- php-src/ext/tidy/php_tidy.h:1.26.2.1.2.5.2.1Mon Dec 31 07:17:16 2007 +++ php-src/ext/tidy/php_tidy.h Fri Jan 25 20:29:48 2008 @@ -16,12 +16,12 @@ +--+ */ -/* $Id: php_tidy.h,v 1.26.2.1.2.5.2.1 2007/12/31 07:17:16 sebastian Exp $ */ +/* $Id: php_tidy.h,v 1.26.2.1.2.5.2.2 2008/01/25 20:29:48 nlopess Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H -extern zend_module_entry tidy_module_entry; +extern const zend_module_entry tidy_module_entry; #define phpext_tidy_ptr tidy_module_entry #define TIDY_METHOD_MAP(name, func_name, arg_types) \ http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.24.2.3r2=1.66.2.8.2.24.2.4diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.3 php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.4 --- php-src/ext/tidy/tidy.c:1.66.2.8.2.24.2.3 Mon Dec 31 07:17:16 2007 +++ php-src/ext/tidy/tidy.c Fri Jan 25 20:29:48 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: tidy.c,v 1.66.2.8.2.24.2.3 2007/12/31 07:17:16 sebastian Exp $ */ +/* $Id: tidy.c,v 1.66.2.8.2.24.2.4 2008/01/25 20:29:48 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -351,7 +351,7 @@ static zend_object_handlers tidy_object_handlers_doc; static zend_object_handlers tidy_object_handlers_node; -zend_module_entry tidy_module_entry = { +const zend_module_entry tidy_module_entry = { STANDARD_MODULE_HEADER, tidy, tidy_functions, @@ -998,7 +998,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Tidy support, enabled); php_info_print_table_row(2, libTidy Release, (char *)tidyReleaseDate()); - php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.66.2.8.2.24.2.3 2007/12/31 07:17:16 sebastian Exp $)); + php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.66.2.8.2.24.2.4 2008/01/25 20:29:48 nlopess Exp $)); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_sqlstate.c
nlopess Fri Jan 25 19:57:58 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdopdo_sqlstate.c Log: move about 3K of data to the const area. also reduce memory usage (~ -266 bytes :P) http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sqlstate.c?r1=1.7.2.1.2.1.2.1r2=1.7.2.1.2.1.2.2diff_format=u Index: php-src/ext/pdo/pdo_sqlstate.c diff -u php-src/ext/pdo/pdo_sqlstate.c:1.7.2.1.2.1.2.1 php-src/ext/pdo/pdo_sqlstate.c:1.7.2.1.2.1.2.2 --- php-src/ext/pdo/pdo_sqlstate.c:1.7.2.1.2.1.2.1 Mon Dec 31 07:17:11 2007 +++ php-src/ext/pdo/pdo_sqlstate.c Fri Jan 25 19:57:57 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pdo_sqlstate.c,v 1.7.2.1.2.1.2.1 2007/12/31 07:17:11 sebastian Exp $ */ +/* $Id: pdo_sqlstate.c,v 1.7.2.1.2.1.2.2 2008/01/25 19:57:57 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -29,13 +29,13 @@ #include php_pdo_driver.h struct pdo_sqlstate_info { - char state[6]; + const char state[5]; const char *desc; }; static HashTable err_hash; -static struct pdo_sqlstate_info err_initializer[] = { +static const struct pdo_sqlstate_info err_initializer[] = { { 0, No error }, { 01000, Warning }, { 01001, Cursor operation conflict }, @@ -312,7 +312,7 @@ int pdo_sqlstate_init_error_table(void) { int i; - struct pdo_sqlstate_info *info; + const struct pdo_sqlstate_info *info; if (FAILURE == zend_hash_init(err_hash, sizeof(err_initializer)/sizeof(err_initializer[0]), NULL, NULL, 1)) { @@ -330,7 +330,7 @@ const char *pdo_sqlstate_state_to_description(char *state) { - struct pdo_sqlstate_info **info; + const struct pdo_sqlstate_info **info; if (SUCCESS == zend_hash_find(err_hash, state, sizeof(err_initializer[0].state), (void**)info)) { return (*info)-desc; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/ereg/regex cname.h
nlopess Fri Jan 25 20:04:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ereg/regex cname.h Log: const'ify more 768 bytes http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/cname.h?r1=1.3.36.2r2=1.3.36.3diff_format=u Index: php-src/ext/ereg/regex/cname.h diff -u php-src/ext/ereg/regex/cname.h:1.3.36.2 php-src/ext/ereg/regex/cname.h:1.3.36.3 --- php-src/ext/ereg/regex/cname.h:1.3.36.2 Fri Oct 5 15:00:06 2007 +++ php-src/ext/ereg/regex/cname.h Fri Jan 25 20:04:10 2008 @@ -1,6 +1,6 @@ /* character-name table */ -static struct cname { - char *name; +static const struct cname { + const char *name; char code; } cnames[] = { {NUL, '\0'}, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre php_pcre.c php_pcre.h
nlopess Fri Jan 25 19:38:26 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pcre php_pcre.c php_pcre.h Log: spread some static keywords http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.21.2.9r2=1.168.2.9.2.21.2.10diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.9 php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.10 --- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.21.2.9 Sun Jan 13 14:44:29 2008 +++ php-src/ext/pcre/php_pcre.c Fri Jan 25 19:38:26 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.9 2008/01/13 14:44:29 nlopess Exp $ */ +/* $Id: php_pcre.c,v 1.168.2.9.2.21.2.10 2008/01/25 19:38:26 nlopess Exp $ */ #include php.h #include php_ini.h @@ -748,7 +748,7 @@ /* {{{ proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]]) Perform a Perl-style regular expression match */ -PHP_FUNCTION(preg_match) +static PHP_FUNCTION(preg_match) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -756,7 +756,7 @@ /* {{{ proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]]) Perform a Perl-style global regular expression match */ -PHP_FUNCTION(preg_match_all) +static PHP_FUNCTION(preg_match_all) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -1369,7 +1369,7 @@ /* {{{ proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]]) Perform Perl-style regular expression replacement. */ -PHP_FUNCTION(preg_replace) +static PHP_FUNCTION(preg_replace) { preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -1377,7 +1377,7 @@ /* {{{ proto string preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, count]]) Perform Perl-style regular expression replacement using replacement callback. */ -PHP_FUNCTION(preg_replace_callback) +static PHP_FUNCTION(preg_replace_callback) { preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -1385,7 +1385,7 @@ /* {{{ proto array preg_split(string pattern, string subject [, int limit [, int flags]]) Split string into an array using a perl-style regular expression as a delimiter */ -PHP_FUNCTION(preg_split) +static PHP_FUNCTION(preg_split) { char*regex; /* Regular expression */ char*subject; /* String to match against */ @@ -1583,7 +1583,7 @@ /* {{{ proto string preg_quote(string str [, string delim_char]) Quote regular expression characters plus an optional character */ -PHP_FUNCTION(preg_quote) +static PHP_FUNCTION(preg_quote) { int in_str_len; char*in_str;/* Input string argument */ @@ -1669,7 +1669,7 @@ /* {{{ proto array preg_grep(string regex, array input [, int flags]) Searches array and returns entries which match regex */ -PHP_FUNCTION(preg_grep) +static PHP_FUNCTION(preg_grep) { char*regex; /* Regular expression */ int regex_len; @@ -1779,7 +1779,7 @@ /* {{{ proto int preg_last_error() Returns the error code of the last regexp execution. */ -PHP_FUNCTION(preg_last_error) +static PHP_FUNCTION(preg_last_error) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { return; @@ -1791,7 +1791,7 @@ /* {{{ module definition structures */ -const zend_function_entry pcre_functions[] = { +static const zend_function_entry pcre_functions[] = { PHP_FE(preg_match, third_arg_force_ref) PHP_FE(preg_match_all, third_arg_force_ref) PHP_FE(preg_replace,fifth_arg_force_ref) http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.h?r1=1.41.2.1.2.5.2.1r2=1.41.2.1.2.5.2.2diff_format=u Index: php-src/ext/pcre/php_pcre.h diff -u php-src/ext/pcre/php_pcre.h:1.41.2.1.2.5.2.1 php-src/ext/pcre/php_pcre.h:1.41.2.1.2.5.2.2 --- php-src/ext/pcre/php_pcre.h:1.41.2.1.2.5.2.1Mon Dec 31 07:17:11 2007 +++ php-src/ext/pcre/php_pcre.h Fri Jan 25 19:38:26 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.h,v 1.41.2.1.2.5.2.1 2007/12/31 07:17:11 sebastian Exp $ */ +/* $Id: php_pcre.h,v 1.41.2.1.2.5.2.2 2008/01/25 19:38:26 nlopess Exp $ */ #ifndef PHP_PCRE_H #define PHP_PCRE_H @@ -33,14 +33,6 @@ #include locale.h #endif -PHP_FUNCTION(preg_match); -PHP_FUNCTION(preg_match_all); -PHP_FUNCTION(preg_replace); -PHP_FUNCTION(preg_replace_callback); -PHP_FUNCTION(preg_split); -PHP_FUNCTION(preg_quote); -PHP_FUNCTION(preg_grep); - PHPAPI char
[PHP-CVS] cvs: php-src /ext/standard html.c
scottmacFri Jan 25 18:11:19 2008 UTC Modified files: /php-src/ext/standard html.c Log: MFB: Fix html_entity_decode when converting numeric html entities, the numeric values for the extended character set don't correspond to that of windows-1251 and cp866. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.129r2=1.130diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.129 php-src/ext/standard/html.c:1.130 --- php-src/ext/standard/html.c:1.129 Mon Dec 31 07:12:15 2007 +++ php-src/ext/standard/html.c Fri Jan 25 18:11:19 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.129 2007/12/31 07:12:15 sebastian Exp $ */ +/* $Id: html.c,v 1.130 2008/01/25 18:11:19 scottmac Exp $ */ /* * HTML entity resources: @@ -1043,8 +1043,6 @@ break; case cs_cp1252: - case cs_cp1251: - case cs_cp866: if (code 0xff) { invalid_code = 1; } else { @@ -1052,6 +1050,8 @@ } break; + case cs_cp1251: + case cs_cp866: case cs_big5: case cs_big5hkscs: case cs_sjis: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard html.c
scottmacFri Jan 25 18:10:46 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard html.c Log: Fix html_entity_decode when converting numeric html entities, the numeric values for the extended characters don't correspond to that of windows-1251 and cp866. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.87r2=1.2027.2.547.2.965.2.88diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.87 php-src/NEWS:1.2027.2.547.2.965.2.88 --- php-src/NEWS:1.2027.2.547.2.965.2.87Thu Jan 24 09:46:59 2008 +++ php-src/NEWSFri Jan 25 18:10:45 2008 @@ -82,6 +82,8 @@ - Changed exception handling. Now each op_array doesn't contain ZEND_HANDLE_EXCEPTION opcode in the end. (Dmitry) +- Fixed html_entity_decode() incorrectly converting numeric html entities + to different characters with cp1251 and cp866. (Scott) - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf) - Fixed bug #43808 (date_create never fails (even when it should)). (Derick) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.14.2.5r2=1.111.2.2.2.14.2.6diff_format=u Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.111.2.2.2.14.2.5 php-src/ext/standard/html.c:1.111.2.2.2.14.2.6 --- php-src/ext/standard/html.c:1.111.2.2.2.14.2.5 Mon Dec 31 07:17:15 2007 +++ php-src/ext/standard/html.c Fri Jan 25 18:10:45 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: html.c,v 1.111.2.2.2.14.2.5 2007/12/31 07:17:15 sebastian Exp $ */ +/* $Id: html.c,v 1.111.2.2.2.14.2.6 2008/01/25 18:10:45 scottmac Exp $ */ /* * HTML entity resources: @@ -1034,8 +1034,6 @@ break; case cs_cp1252: - case cs_cp1251: - case cs_cp866: if (code 0xff) { invalid_code = 1; } else { @@ -1043,6 +1041,8 @@ } break; + case cs_cp1251: + case cs_cp866: case cs_big5: case cs_big5hkscs: case cs_sjis: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard array.c
rrichards Fri Jan 25 15:52:00 2008 UTC Modified files: /php-src/ext/standard array.c Log: fix zts build http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.437r2=1.438diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.437 php-src/ext/standard/array.c:1.438 --- php-src/ext/standard/array.c:1.437 Fri Jan 25 13:42:24 2008 +++ php-src/ext/standard/array.cFri Jan 25 15:52:00 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.437 2008/01/25 13:42:24 tony2001 Exp $ */ +/* $Id: array.c,v 1.438 2008/01/25 15:52:00 rrichards Exp $ */ #include php.h #include php_ini.h @@ -1534,7 +1534,7 @@ } /* }}} */ -static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_value, zval *entry) /* {{{ */ +static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_value, zval *entry TSRMLS_DC) /* {{{ */ { zstr key; int key_len; @@ -1585,7 +1585,7 @@ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(entry), (void**)value_ptr, pos) == SUCCESS) { value = *value_ptr; - php_compact_var(eg_active_symbol_table, return_value, value); + php_compact_var(eg_active_symbol_table, return_value, value TSRMLS_CC); zend_hash_move_forward_ex(Z_ARRVAL_P(entry), pos); } Z_ARRVAL_P(entry)-nApplyCount--; @@ -1613,7 +1613,7 @@ array_init(return_value); for (i=0; iZEND_NUM_ARGS(); i++) { - php_compact_var(EG(active_symbol_table), return_value, *args[i]); + php_compact_var(EG(active_symbol_table), return_value, *args[i] TSRMLS_CC); } efree(args); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard array.c
tony2001Fri Jan 25 13:42:24 2008 UTC Modified files: /php-src/ext/standard array.c Log: endless loop (and stack overflow) protection in compact() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.436r2=1.437diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.436 php-src/ext/standard/array.c:1.437 --- php-src/ext/standard/array.c:1.436 Wed Jan 23 11:20:00 2008 +++ php-src/ext/standard/array.cFri Jan 25 13:42:24 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.436 2008/01/23 11:20:00 tony2001 Exp $ */ +/* $Id: array.c,v 1.437 2008/01/25 13:42:24 tony2001 Exp $ */ #include php.h #include php_ini.h @@ -1574,6 +1574,13 @@ else if (Z_TYPE_P(entry) == IS_ARRAY) { HashPosition pos; + if ((Z_ARRVAL_P(entry)-nApplyCount 1)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, recursion detected); + return; + } + + Z_ARRVAL_P(entry)-nApplyCount++; + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(entry), pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(entry), (void**)value_ptr, pos) == SUCCESS) { value = *value_ptr; @@ -1581,6 +1588,7 @@ php_compact_var(eg_active_symbol_table, return_value, value); zend_hash_move_forward_ex(Z_ARRVAL_P(entry), pos); } + Z_ARRVAL_P(entry)-nApplyCount--; } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/filter filter.c
nlopess Fri Jan 25 20:21:18 2008 UTC Modified files: /php-src/ext/filter filter.c Log: MFB: const keywording http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.89r2=1.90diff_format=u Index: php-src/ext/filter/filter.c diff -u php-src/ext/filter/filter.c:1.89 php-src/ext/filter/filter.c:1.90 --- php-src/ext/filter/filter.c:1.89Mon Dec 31 07:12:09 2007 +++ php-src/ext/filter/filter.c Fri Jan 25 20:21:18 2008 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: filter.c,v 1.89 2007/12/31 07:12:09 sebastian Exp $ */ +/* $Id: filter.c,v 1.90 2008/01/25 20:21:18 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -38,7 +38,7 @@ } filter_list_entry; /* {{{ filter_list */ -filter_list_entry filter_list[] = { +static const filter_list_entry filter_list[] = { { int, FILTER_VALIDATE_INT, php_filter_int }, { boolean, FILTER_VALIDATE_BOOLEAN, php_filter_boolean }, { float, FILTER_VALIDATE_FLOAT, php_filter_float }, @@ -79,7 +79,7 @@ /* {{{ filter_functions[] */ -const zend_function_entry filter_functions[] = { +static const zend_function_entry filter_functions[] = { PHP_FE(filter_input,NULL) PHP_FE(filter_var, NULL) PHP_FE(filter_input_array, NULL) @@ -275,7 +275,7 @@ { php_info_print_table_start(); php_info_print_table_row( 2, Input Validation and Filtering, enabled ); - php_info_print_table_row( 2, Revision, $Revision: 1.89 $); + php_info_print_table_row( 2, Revision, $Revision: 1.90 $); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl php_spl.c php_spl.h /ext/tidy php_tidy.h tidy.c
nlopess Fri Jan 25 20:30:36 2008 UTC Modified files: /php-src/ext/splphp_spl.c php_spl.h /php-src/ext/tidy php_tidy.h tidy.c Log: MFB: const keywording http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.120r2=1.121diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.120 php-src/ext/spl/php_spl.c:1.121 --- php-src/ext/spl/php_spl.c:1.120 Tue Jan 15 09:37:50 2008 +++ php-src/ext/spl/php_spl.c Fri Jan 25 20:30:36 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.120 2008/01/15 09:37:50 colder Exp $ */ +/* $Id: php_spl.c,v 1.121 2008/01/25 20:30:36 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -46,13 +46,6 @@ ZEND_DECLARE_MODULE_GLOBALS(spl) -/* {{{ spl_functions_none - */ -const zend_function_entry spl_functions_none[] = { - {NULL, NULL, NULL} -}; -/* }}} */ - /* {{{ PHP_GINIT_FUNCTION */ static PHP_GINIT_FUNCTION(spl) @@ -788,7 +781,7 @@ /* {{{ spl_module_entry */ -zend_module_entry spl_module_entry = { +const zend_module_entry spl_module_entry = { #ifdef HAVE_SIMPLEXML STANDARD_MODULE_HEADER_EX, NULL, spl_deps, http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.h?r1=1.24r2=1.25diff_format=u Index: php-src/ext/spl/php_spl.h diff -u php-src/ext/spl/php_spl.h:1.24 php-src/ext/spl/php_spl.h:1.25 --- php-src/ext/spl/php_spl.h:1.24 Mon Dec 31 07:12:14 2007 +++ php-src/ext/spl/php_spl.h Fri Jan 25 20:30:36 2008 @@ -28,7 +28,7 @@ #define SPL_DEBUG(x) #endif -extern zend_module_entry spl_module_entry; +extern const zend_module_entry spl_module_entry; #define phpext_spl_ptr spl_module_entry #ifdef PHP_WIN32 http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.36r2=1.37diff_format=u Index: php-src/ext/tidy/php_tidy.h diff -u php-src/ext/tidy/php_tidy.h:1.36 php-src/ext/tidy/php_tidy.h:1.37 --- php-src/ext/tidy/php_tidy.h:1.36Mon Dec 31 07:12:17 2007 +++ php-src/ext/tidy/php_tidy.h Fri Jan 25 20:30:36 2008 @@ -16,12 +16,12 @@ +--+ */ -/* $Id: php_tidy.h,v 1.36 2007/12/31 07:12:17 sebastian Exp $ */ +/* $Id: php_tidy.h,v 1.37 2008/01/25 20:30:36 nlopess Exp $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H -extern zend_module_entry tidy_module_entry; +extern const zend_module_entry tidy_module_entry; #define phpext_tidy_ptr tidy_module_entry #define TIDY_METHOD_MAP(name, func_name, arg_types) \ http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.118r2=1.119diff_format=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.118 php-src/ext/tidy/tidy.c:1.119 --- php-src/ext/tidy/tidy.c:1.118 Mon Dec 31 07:12:17 2007 +++ php-src/ext/tidy/tidy.c Fri Jan 25 20:30:36 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: tidy.c,v 1.118 2007/12/31 07:12:17 sebastian Exp $ */ +/* $Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -359,7 +359,7 @@ static zend_object_handlers tidy_object_handlers_doc; static zend_object_handlers tidy_object_handlers_node; -zend_module_entry tidy_module_entry = { +const zend_module_entry tidy_module_entry = { STANDARD_MODULE_HEADER, tidy, tidy_functions, @@ -1062,7 +1062,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Tidy support, enabled); php_info_print_table_row(2, libTidy Release, (char *)tidyReleaseDate()); - php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.118 2007/12/31 07:12:17 sebastian Exp $)); + php_info_print_table_row(2, Extension Version, PHP_TIDY_MODULE_VERSION ($Id: tidy.c,v 1.119 2008/01/25 20:30:36 nlopess Exp $)); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/filter filter.c
nlopess Fri Jan 25 20:20:07 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/filter filter.c Log: const more 216 bytes (on a 32-bits host) http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.39.2.2r2=1.52.2.39.2.3diff_format=u Index: php-src/ext/filter/filter.c diff -u php-src/ext/filter/filter.c:1.52.2.39.2.2 php-src/ext/filter/filter.c:1.52.2.39.2.3 --- php-src/ext/filter/filter.c:1.52.2.39.2.2 Mon Dec 31 07:17:08 2007 +++ php-src/ext/filter/filter.c Fri Jan 25 20:20:07 2008 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: filter.c,v 1.52.2.39.2.2 2007/12/31 07:17:08 sebastian Exp $ */ +/* $Id: filter.c,v 1.52.2.39.2.3 2008/01/25 20:20:07 nlopess Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -38,7 +38,7 @@ } filter_list_entry; /* {{{ filter_list */ -filter_list_entry filter_list[] = { +static const filter_list_entry filter_list[] = { { int, FILTER_VALIDATE_INT, php_filter_int }, { boolean, FILTER_VALIDATE_BOOLEAN, php_filter_boolean }, { float, FILTER_VALIDATE_FLOAT, php_filter_float }, @@ -79,7 +79,7 @@ /* {{{ filter_functions[] */ -const zend_function_entry filter_functions[] = { +static const zend_function_entry filter_functions[] = { PHP_FE(filter_input,NULL) PHP_FE(filter_var, NULL) PHP_FE(filter_input_array, NULL) @@ -275,7 +275,7 @@ { php_info_print_table_start(); php_info_print_table_row( 2, Input Validation and Filtering, enabled ); - php_info_print_table_row( 2, Revision, $Revision: 1.52.2.39.2.2 $); + php_info_print_table_row( 2, Revision, $Revision: 1.52.2.39.2.3 $); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/ereg/regex cname.h
nlopess Fri Jan 25 20:04:44 2008 UTC Modified files: /php-src/ext/ereg/regex cname.h Log: MFB: const'ify http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/cname.h?r1=1.3r2=1.4diff_format=u Index: php-src/ext/ereg/regex/cname.h diff -u php-src/ext/ereg/regex/cname.h:1.3 php-src/ext/ereg/regex/cname.h:1.4 --- php-src/ext/ereg/regex/cname.h:1.3 Tue Dec 28 20:50:34 1999 +++ php-src/ext/ereg/regex/cname.h Fri Jan 25 20:04:44 2008 @@ -1,6 +1,6 @@ /* character-name table */ -static struct cname { - char *name; +static const struct cname { + const char *name; char code; } cnames[] = { {NUL, '\0'}, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pcre php_pcre.c php_pcre.h
nlopess Fri Jan 25 19:39:45 2008 UTC Modified files: /php-src/ext/pcre php_pcre.c php_pcre.h Log: spread some static keywords http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.228r2=1.229diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.228 php-src/ext/pcre/php_pcre.c:1.229 --- php-src/ext/pcre/php_pcre.c:1.228 Sun Jan 13 14:57:53 2008 +++ php-src/ext/pcre/php_pcre.c Fri Jan 25 19:39:45 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.c,v 1.228 2008/01/13 14:57:53 nlopess Exp $ */ +/* $Id: php_pcre.c,v 1.229 2008/01/25 19:39:45 nlopess Exp $ */ /* TODO * php_pcre_replace_impl(): @@ -875,7 +875,7 @@ /* {{{ proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]]) U Perform a Perl-style regular expression match */ -PHP_FUNCTION(preg_match) +static PHP_FUNCTION(preg_match) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -883,7 +883,7 @@ /* {{{ proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]]) U Perform a Perl-style global regular expression match */ -PHP_FUNCTION(preg_match_all) +static PHP_FUNCTION(preg_match_all) { php_do_pcre_match(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -1535,7 +1535,7 @@ /* {{{ proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]]) U Perform Perl-style regular expression replacement. */ -PHP_FUNCTION(preg_replace) +static PHP_FUNCTION(preg_replace) { preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } @@ -1543,7 +1543,7 @@ /* {{{ proto string preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, count]]) U Perform Perl-style regular expression replacement using replacement callback. */ -PHP_FUNCTION(preg_replace_callback) +static PHP_FUNCTION(preg_replace_callback) { preg_replace_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } @@ -1551,7 +1551,7 @@ /* {{{ proto array preg_split(string pattern, string subject [, int limit [, int flags]]) U Split string into an array using a perl-style regular expression as a delimiter */ -PHP_FUNCTION(preg_split) +static PHP_FUNCTION(preg_split) { zstr regex; /* Regular expression */ zstr subject; /* String to match against */ @@ -1771,7 +1771,7 @@ /* {{{ proto string preg_quote(string str [, string delim_char]) U Quote regular expression characters plus an optional character */ -PHP_FUNCTION(preg_quote) +static PHP_FUNCTION(preg_quote) { int in_str_len; char*in_str;/* Input string argument */ @@ -1876,7 +1876,7 @@ /* {{{ proto array preg_grep(string regex, array input [, int flags]) U Searches array and returns entries which match regex */ -PHP_FUNCTION(preg_grep) +static PHP_FUNCTION(preg_grep) { zstr regex; /* Regular expression */ int regex_len; @@ -2021,7 +2021,7 @@ /* {{{ proto int preg_last_error() Returns the error code of the last regexp execution. */ -PHP_FUNCTION(preg_last_error) +static PHP_FUNCTION(preg_last_error) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ) == FAILURE) { return; @@ -2033,7 +2033,7 @@ /* {{{ module definition structures */ -const zend_function_entry pcre_functions[] = { +static const zend_function_entry pcre_functions[] = { PHP_FE(preg_match, third_arg_force_ref) PHP_FE(preg_match_all, third_arg_force_ref) PHP_FE(preg_replace,fifth_arg_force_ref) http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.h?r1=1.54r2=1.55diff_format=u Index: php-src/ext/pcre/php_pcre.h diff -u php-src/ext/pcre/php_pcre.h:1.54 php-src/ext/pcre/php_pcre.h:1.55 --- php-src/ext/pcre/php_pcre.h:1.54Mon Dec 31 07:12:12 2007 +++ php-src/ext/pcre/php_pcre.h Fri Jan 25 19:39:45 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_pcre.h,v 1.54 2007/12/31 07:12:12 sebastian Exp $ */ +/* $Id: php_pcre.h,v 1.55 2008/01/25 19:39:45 nlopess Exp $ */ #ifndef PHP_PCRE_H #define PHP_PCRE_H @@ -33,14 +33,6 @@ #include locale.h #endif -PHP_FUNCTION(preg_match); -PHP_FUNCTION(preg_match_all); -PHP_FUNCTION(preg_replace); -PHP_FUNCTION(preg_replace_callback); -PHP_FUNCTION(preg_split); -PHP_FUNCTION(preg_quote); -PHP_FUNCTION(preg_grep); - PHPAPI char *php_pcre_replace(zend_uchar utype, char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
[PHP-CVS] cvs: CVSROOT / avail
helly Fri Jan 25 13:26:56 2008 UTC Modified files: /CVSROOTavail Log: - WS http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1348r2=1.1349diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1348 CVSROOT/avail:1.1349 --- CVSROOT/avail:1.1348Tue Jan 15 14:58:45 2008 +++ CVSROOT/avail Fri Jan 25 13:26:55 2008 @@ -25,7 +25,7 @@ # Win Installer avail|edink,jmertic|win-installer -# Limited group of people with ZendAPI write access +# Limited group of people with ZendAPI write access # (the contents now reside in the phpdoc module) avail|goba|ZendAPI @@ -310,7 +310,7 @@ avail|dsr|pecl/sam,phpdoc avail|ramsey|pecl/uploadprogress -avail|ramsey|pecl/pdo_user +avail|ramsey|pecl/pdo_user # PDO Specs. CLA required to commit unavail||pdo-specs @@ -321,7 +321,7 @@ # gd karma # Please ask [EMAIL PROTECTED] before adding some unknown guys :) -# gd/libgd is the library itself, other directories are for +# gd/libgd is the library itself, other directories are for # the various tools (website, bugs,...) avail|pajoye,edink,lhecking,mloskot,nlopess,scottmac,guenter,mattias,kshepherd,chapg|gd avail|mattias|php-src/ext/gd -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
helly Fri Jan 25 13:28:52 2008 UTC Modified files: /CVSROOTavail Log: - Give steph access to phar http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1349r2=1.1350diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1349 CVSROOT/avail:1.1350 --- CVSROOT/avail:1.1349Fri Jan 25 13:26:55 2008 +++ CVSROOT/avail Fri Jan 25 13:28:52 2008 @@ -288,6 +288,7 @@ avail|mkoppanen|pecl/ssh2 avail|bdeshong|pecl/usblib avail|francois|pecl/phk,pecl/automap +avail|sfox|pecl/phar # Objective-C bridge avail|wez,jan|php-objc -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c
tony2001Fri Jan 25 13:42:36 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: MFH: endless loop (and stack overflow) protection in compact() http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.15r2=1.308.2.21.2.37.2.16diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.15 php-src/ext/standard/array.c:1.308.2.21.2.37.2.16 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.15 Wed Jan 23 12:09:52 2008 +++ php-src/ext/standard/array.cFri Jan 25 13:42:36 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.15 2008/01/23 12:09:52 tony2001 Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.16 2008/01/25 13:42:36 tony2001 Exp $ */ #include php.h #include php_ini.h @@ -1450,6 +1450,13 @@ else if (Z_TYPE_P(entry) == IS_ARRAY) { HashPosition pos; + if ((Z_ARRVAL_P(entry)-nApplyCount 1)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, recursion detected); + return; + } + + Z_ARRVAL_P(entry)-nApplyCount++; + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(entry), pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(entry), (void**)value_ptr, pos) == SUCCESS) { value = *value_ptr; @@ -1457,6 +1464,7 @@ php_compact_var(eg_active_symbol_table, return_value, value); zend_hash_move_forward_ex(Z_ARRVAL_P(entry), pos); } + Z_ARRVAL_P(entry)-nApplyCount--; } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqlnd mysqlnd_result.c
rrichards Fri Jan 25 15:54:31 2008 UTC Modified files: /php-src/ext/mysqlndmysqlnd_result.c Log: fix win32 compile http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.10r2=1.11diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result.c diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.10 php-src/ext/mysqlnd/mysqlnd_result.c:1.11 --- php-src/ext/mysqlnd/mysqlnd_result.c:1.10 Wed Jan 23 19:09:33 2008 +++ php-src/ext/mysqlnd/mysqlnd_result.cFri Jan 25 15:54:31 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_result.c,v 1.10 2008/01/23 19:09:33 andrey Exp $ */ +/* $Id: mysqlnd_result.c,v 1.11 2008/01/25 15:54:31 rrichards Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -766,9 +766,9 @@ if (result-data-data_cursor (result-data-data_cursor - result-data-data) result-data-row_count) { - ret = mnd_malloc(result-field_count * sizeof(char *)); - zval **current_row = *result-data-data_cursor; + + ret = mnd_malloc(result-field_count * sizeof(char *)); for (i = 0; i result-field_count; i++) { zval *data = current_row[i]; if (Z_TYPE_P(data) != IS_NULL) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mysqlnd mysqlnd_result.c
rrichards Fri Jan 25 15:54:58 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysqlndmysqlnd_result.c Log: MFH: fix win32 compile http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_result.c?r1=1.4.2.6r2=1.4.2.7diff_format=u Index: php-src/ext/mysqlnd/mysqlnd_result.c diff -u php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.6 php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.7 --- php-src/ext/mysqlnd/mysqlnd_result.c:1.4.2.6Wed Jan 23 19:11:28 2008 +++ php-src/ext/mysqlnd/mysqlnd_result.cFri Jan 25 15:54:58 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: mysqlnd_result.c,v 1.4.2.6 2008/01/23 19:11:28 andrey Exp $ */ +/* $Id: mysqlnd_result.c,v 1.4.2.7 2008/01/25 15:54:58 rrichards Exp $ */ #include php.h #include mysqlnd.h #include mysqlnd_wireprotocol.h @@ -766,9 +766,9 @@ if (result-data-data_cursor (result-data-data_cursor - result-data-data) result-data-row_count) { - ret = mnd_malloc(result-field_count * sizeof(char *)); - zval **current_row = *result-data-data_cursor; + + ret = mnd_malloc(result-field_count * sizeof(char *)); for (i = 0; i result-field_count; i++) { zval *data = current_row[i]; if (Z_TYPE_P(data) != IS_NULL) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/standard array.c
On 25.01.2008 18:52, Rob Richards wrote: rrichards Fri Jan 25 15:52:00 2008 UTC Modified files: /php-src/ext/standard array.c Log: fix zts build Thanks! -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom dom_fe.h php_dom.c php_dom.h xpath.c /ext/dom/tests domxpath.phpt
rrichards Fri Jan 25 16:13:04 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/dom/tests domxpath.phpt Modified files: /php-src/ext/domdom_fe.h php_dom.c php_dom.h xpath.c Log: backport functionality to call user functions within XPath add test http://cvs.php.net/viewvc.cgi/php-src/ext/dom/dom_fe.h?r1=1.14.2.1.2.4.2.2r2=1.14.2.1.2.4.2.3diff_format=u Index: php-src/ext/dom/dom_fe.h diff -u php-src/ext/dom/dom_fe.h:1.14.2.1.2.4.2.2 php-src/ext/dom/dom_fe.h:1.14.2.1.2.4.2.3 --- php-src/ext/dom/dom_fe.h:1.14.2.1.2.4.2.2 Mon Dec 31 07:17:07 2007 +++ php-src/ext/dom/dom_fe.hFri Jan 25 16:13:04 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dom_fe.h,v 1.14.2.1.2.4.2.2 2007/12/31 07:17:07 sebastian Exp $ */ +/* $Id: dom_fe.h,v 1.14.2.1.2.4.2.3 2008/01/25 16:13:04 rrichards Exp $ */ #ifndef DOM_FE_H #define DOM_FE_H @@ -264,6 +264,7 @@ PHP_FUNCTION(dom_xpath_register_ns); PHP_FUNCTION(dom_xpath_query); PHP_FUNCTION(dom_xpath_evaluate); +PHP_FUNCTION(dom_xpath_register_php_functions); #endif #endif /* DOM_FE_H */ http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.12.2.3r2=1.73.2.12.2.12.2.4diff_format=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.3 php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.4 --- php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.3Mon Dec 31 07:17:07 2007 +++ php-src/ext/dom/php_dom.c Fri Jan 25 16:13:04 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.c,v 1.73.2.12.2.12.2.3 2007/12/31 07:17:07 sebastian Exp $ */ +/* $Id: php_dom.c,v 1.73.2.12.2.12.2.4 2008/01/25 16:13:04 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -960,7 +960,7 @@ /* {{{ dom_xpath_objects_free_storage */ void dom_xpath_objects_free_storage(void *object TSRMLS_DC) { - dom_object *intern = (dom_object *)object; + dom_xpath_object *intern = (dom_xpath_object *)object; zend_object_std_dtor(intern-std TSRMLS_CC); @@ -970,6 +970,14 @@ intern-ptr = NULL; } + zend_hash_destroy(intern-registered_phpfunctions); + FREE_HASHTABLE(intern-registered_phpfunctions); + + if (intern-node_list) { + zend_hash_destroy(intern-node_list); + FREE_HASHTABLE(intern-node_list); + } + efree(object); } /* }}} */ @@ -1026,7 +1034,12 @@ zval *tmp; dom_object *intern; - intern = emalloc(sizeof(dom_object)); + if (instanceof_function(class_type, dom_xpath_class_entry TSRMLS_CC)) { + intern = emalloc(sizeof(dom_xpath_object)); + memset(intern, 0, sizeof(dom_xpath_object)); + } else { + intern = emalloc(sizeof(dom_object)); + } intern-ptr = NULL; intern-prop_handler = NULL; intern-document = NULL; @@ -1097,9 +1110,15 @@ zend_object_value dom_xpath_objects_new(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - dom_object *intern; - - intern = dom_objects_set_class(class_type, 1 TSRMLS_CC); + dom_xpath_object *intern; + + intern = (dom_xpath_object *)dom_objects_set_class(class_type, 1 TSRMLS_CC); + intern-registerPhpFunctions = 0; + intern-registered_phpfunctions = NULL; + intern-node_list = NULL; + + ALLOC_HASHTABLE(intern-registered_phpfunctions); + zend_hash_init(intern-registered_phpfunctions, 0, NULL, ZVAL_PTR_DTOR, 0); retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)dom_xpath_objects_free_storage, dom_objects_clone TSRMLS_CC); intern-handle = retval.handle; http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.h?r1=1.28.2.1.2.4.2.1r2=1.28.2.1.2.4.2.2diff_format=u Index: php-src/ext/dom/php_dom.h diff -u php-src/ext/dom/php_dom.h:1.28.2.1.2.4.2.1 php-src/ext/dom/php_dom.h:1.28.2.1.2.4.2.2 --- php-src/ext/dom/php_dom.h:1.28.2.1.2.4.2.1 Mon Dec 31 07:17:07 2007 +++ php-src/ext/dom/php_dom.h Fri Jan 25 16:13:04 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_dom.h,v 1.28.2.1.2.4.2.1 2007/12/31 07:17:07 sebastian Exp $ */ +/* $Id: php_dom.h,v 1.28.2.1.2.4.2.2 2008/01/25 16:13:04 rrichards Exp $ */ #ifndef PHP_DOM_H #define PHP_DOM_H @@ -67,6 +67,17 @@ /* Define a custom type for iterating using an unused nodetype */ #define DOM_NODESET XML_XINCLUDE_START +typedef struct _dom_xpath_object { + zend_object std; + void *ptr; + php_libxml_ref_obj *document; + HashTable *prop_handler; + zend_object_handle handle; + int registerPhpFunctions; + HashTable *registered_phpfunctions; + HashTable
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard array.c
rrichards Fri Jan 25 15:52:48 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard array.c Log: MFH: fix zts build http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.37.2.16r2=1.308.2.21.2.37.2.17diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.21.2.37.2.16 php-src/ext/standard/array.c:1.308.2.21.2.37.2.17 --- php-src/ext/standard/array.c:1.308.2.21.2.37.2.16 Fri Jan 25 13:42:36 2008 +++ php-src/ext/standard/array.cFri Jan 25 15:52:48 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.308.2.21.2.37.2.16 2008/01/25 13:42:36 tony2001 Exp $ */ +/* $Id: array.c,v 1.308.2.21.2.37.2.17 2008/01/25 15:52:48 rrichards Exp $ */ #include php.h #include php_ini.h @@ -1432,7 +1432,7 @@ } /* }}} */ -static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_value, zval *entry) /* {{{ */ +static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_value, zval *entry TSRMLS_DC) /* {{{ */ { zval **value_ptr, *value, *data; @@ -1461,7 +1461,7 @@ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(entry), (void**)value_ptr, pos) == SUCCESS) { value = *value_ptr; - php_compact_var(eg_active_symbol_table, return_value, value); + php_compact_var(eg_active_symbol_table, return_value, value TSRMLS_CC); zend_hash_move_forward_ex(Z_ARRVAL_P(entry), pos); } Z_ARRVAL_P(entry)-nApplyCount--; @@ -1489,7 +1489,7 @@ array_init(return_value); for (i=0; iZEND_NUM_ARGS(); i++) { - php_compact_var(EG(active_symbol_table), return_value, *args[i]); + php_compact_var(EG(active_symbol_table), return_value, *args[i] TSRMLS_CC); } efree(args); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/ereg/regex cclass.h regerror.c
nlopess Fri Jan 25 20:20:54 2008 UTC Modified files: /php-src/ext/ereg/regex cclass.h regerror.c Log: MFB: const keywording http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/cclass.h?r1=1.4r2=1.5diff_format=u Index: php-src/ext/ereg/regex/cclass.h diff -u php-src/ext/ereg/regex/cclass.h:1.4 php-src/ext/ereg/regex/cclass.h:1.5 --- php-src/ext/ereg/regex/cclass.h:1.4 Tue Sep 30 00:26:03 2003 +++ php-src/ext/ereg/regex/cclass.h Fri Jan 25 20:20:54 2008 @@ -1,8 +1,8 @@ /* character-class table */ -static struct cclass { - unsigned char *name; - unsigned char *chars; - unsigned char *multis; +static const struct cclass { + const unsigned char *name; + const unsigned char *chars; + const unsigned char *multis; } cclasses[] = { {alnum, ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789, }, {alpha, ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz, http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regerror.c?r1=1.7r2=1.8diff_format=u Index: php-src/ext/ereg/regex/regerror.c diff -u php-src/ext/ereg/regex/regerror.c:1.7 php-src/ext/ereg/regex/regerror.c:1.8 --- php-src/ext/ereg/regex/regerror.c:1.7 Thu Jan 24 23:01:47 2008 +++ php-src/ext/ereg/regex/regerror.c Fri Jan 25 20:20:54 2008 @@ -30,10 +30,10 @@ = #define REG_ATOI255 // convert name to number (!) = #define REG_ITOA0400// convert number to name (!) */ -static struct rerr { +static const struct rerr { int code; - char *name; - char *explain; + const char *name; + const char *explain; } rerrs[] = { {REG_OKAY, REG_OKAY, no errors detected}, {REG_NOMATCH, REG_NOMATCH, regexec() failed to match}, @@ -67,10 +67,10 @@ char *errbuf, size_t errbuf_size) { - register struct rerr *r; + register const struct rerr *r; register size_t len; register int target = errcode ~ REG_ITOA; - register char *s; + register const char *s; char convbuf[50]; if (errcode == REG_ATOI) @@ -113,7 +113,7 @@ const regex_t *preg; char *localbuf; { - register struct rerr *r; + register const struct rerr *r; for (r = rerrs; r-code = 0; r++) if (strcmp(r-name, preg-re_endp) == 0) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php