[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Aug 14 01:32:21 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3137r2=1.3138diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3137 php-src/ChangeLog:1.3138 --- php-src/ChangeLog:1.3137Wed Aug 13 01:32:13 2008 +++ php-src/ChangeLog Thu Aug 14 01:32:20 2008 @@ -1,3 +1,156 @@ +2008-08-13 Kalle Sommer Nielsen [EMAIL PROTECTED] + +* (PHP_5_3) + main/php.h + win32/time.c: + MFH: + * Remove NTDDI_VERSION declaring and use the one in config.w32.h + * Remove another _WIN32_WINNT macro redef in win32/time.c + +* main/php.h + win32/time.c: + - Remove NTDDI_VERSION declaring and use the one in config.w32.h + * Remove another _WIN32_WINNT macro redef in win32/time.c + +2008-08-13 Pierre-Alain Joye [EMAIL PROTECTED] + +* ext/reflection/php_reflection.c + main/php_ini.c: + - move declaration on top and fix build error + +* main/php_ini.c: + - MFB: move declaration on top and fix build error + +2008-08-13 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS: + typoh + +2008-08-13 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + ext/ming/ming.c: + - Fixed build (ZTS) + +* ZendEngine2/zend_API.c + ZendEngine2/zend_API.c: + - Fix build + +* ext/snmp/snmp.c: + - New parameter parsing API + +* ext/gmp/gmp.c: + - New parameter parsing API (for gmp_testbit) + +2008-08-13 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_3) + ext/ming/ming.c: + fix long/int issues and a typo + +2008-08-13 Felipe Pena [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS: + - BFN #45798 + +2008-08-13 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_5_2) + ext/pspell/pspell.c + ext/pspell/pspell.c: + MFH: fix compile warnings (patch by Phil Oleson) + +* ext/pspell/pspell.c: + fix compile warnings (patch by Phil Oleson) + +2008-08-13 Dmitry Stogov [EMAIL PROTECTED] + +* ZendEngine2/zend_language_scanner.c + ZendEngine2/zend_language_scanner_defs.h: + Regenerate scanner + +* ZendEngine2/tests/bug45805.phpt + ZendEngine2/tests/bug45805.phpt + ZendEngine2/tests/bug45805.phpt: +1.1.4; + file bug45805.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/tests/bug45805.phpt + ZendEngine2/tests/bug45805.phpt: + Fixed bug #45805 (Crach on throwing exception from error handler) + +* ZendEngine2/zend_language_scanner.l + ZendEngine2/zend_language_scanner_defs.h + sapi/cli/php_cli.c: + Fixed bug #45779 (regression with shebang lines processing) + +2008-08-13 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_2) + Makefile.global + NEWS + ext/standard/info.c + main/php_ini.c + sapi/cgi/cgi_main.c + sapi/cli/php_cli.c + sapi/milter/php_milter.c: + MFH: [DOC]- Added methods to change/disable + --with-config-file-scan-dir=PATH at + MFH: [DOC] startup: + MFH: [DOC] + MFH: [DOC] To disable: Override default php.ini by using both -c and -n + with + MFH: [DOC] CGI/CLI or set PHP_INI_SCAN_DIR environment + variable + MFH: [DOC] to an empty string. + MFH: [DOC] + MFH: [DOC] To change: Simply set PHP_INI_SCAN_DIR environment variable + to point + MFH: [DOC] to another path. + MFH: - Fixed bug #42604 (make test fails with + --with-config-file-scan-dir=/some/path) + MFH: - Implemented FR #45114 (Option to change + --with-config-file-scan-dir) + +2008-08-13 Stanislav Malyshev [EMAIL PROTECTED] + +* (PHP_5_3) + NEWS: + report old bugfix + +2008-08-13 Jani Taskinen [EMAIL PROTECTED] + +* Makefile.global + ext/standard/info.c + main/php_ini.c + sapi/cgi/cgi_main.c + sapi/cli/php_cli.c + sapi/milter/php_milter.c: + [DOC]- Added methods to change/disable --with-config-file-scan-dir=PATH at + [DOC] startup: + [DOC] + [DOC] To disable: Override default php.ini by using both -c and -n with + [DOC] CGI/CLI or set PHP_INI_SCAN_DIR environment variable + [DOC] to an empty string. + [DOC] + [DOC] To change: Simply set PHP_INI_SCAN_DIR environment variable to + point + [DOC] to another path. + + - Fixed bug #42604 (make test fails with + --with-config-file-scan-dir=/some/path) + - Implemented FR #45114 (Option to change --with-config-file-scan-dir) + 2008-08-12 Nuno Lopes [EMAIL PROTECTED] * ZendEngine2/zend_API.h @@
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Thu Aug 14 01:32:26 2008 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.1359r2=1.1360diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.1359 ZendEngine2/ChangeLog:1.1360 --- ZendEngine2/ChangeLog:1.1359Wed Aug 13 01:32:19 2008 +++ ZendEngine2/ChangeLog Thu Aug 14 01:32:26 2008 @@ -1,3 +1,35 @@ +2008-08-13 Felipe Pena [EMAIL PROTECTED] + +* zend_API.c + zend_API.c: + - Fix build + +2008-08-13 Dmitry Stogov [EMAIL PROTECTED] + +* zend_language_scanner.c + zend_language_scanner_defs.h: + Regenerate scanner + +* zend_vm_def.h + zend_vm_def.h + zend_vm_def.h + zend_vm_execute.h + zend_vm_execute.h + zend_vm_execute.h + tests/bug45805.phpt + tests/bug45805.phpt: + Fixed bug #45805 (Crach on throwing exception from error handler) + +* tests/bug45805.phpt + tests/bug45805.phpt + tests/bug45805.phpt: +1.1.4; + file bug45805.phpt was initially added on branch PHP_5_2. + +* zend_language_scanner.l + zend_language_scanner_defs.h: + Fixed bug #45779 (regression with shebang lines processing) + 2008-08-12 Nuno Lopes [EMAIL PROTECTED] * zend_API.h @@ -25563,7 +25595,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.1359 2008/08/13 01:32:19 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.1360 2008/08/14 01:32:26 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -27287,7 +27319,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.1359 2008/08/13 01:32:19 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.1360 2008/08/14 01:32:26 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /sapi/cli php_cli.c ZendEngine2 zend_language_scanner.l zend_language_scanner_defs.h
dmitry Wed Aug 13 06:17:15 2008 UTC Modified files: /ZendEngine2zend_language_scanner.l zend_language_scanner_defs.h /php-src/sapi/cli php_cli.c Log: Fixed bug #45779 (regression with shebang lines processing) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner.l?r1=1.193r2=1.194diff_format=u Index: ZendEngine2/zend_language_scanner.l diff -u ZendEngine2/zend_language_scanner.l:1.193 ZendEngine2/zend_language_scanner.l:1.194 --- ZendEngine2/zend_language_scanner.l:1.193 Tue Aug 12 09:39:39 2008 +++ ZendEngine2/zend_language_scanner.l Wed Aug 13 06:17:15 2008 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: zend_language_scanner.l,v 1.193 2008/08/12 09:39:39 helly Exp $ */ +/* $Id: zend_language_scanner.l,v 1.194 2008/08/13 06:17:15 dmitry Exp $ */ #if 0 # define YYDEBUG(s, c) printf(state: %d char: %c\n, s, c) @@ -1340,6 +1340,7 @@ while (++YYCURSOR YYLIMIT) { if (*YYCURSOR == '\n') { ++YYCURSOR; + CG(zend_lineno)++; goto restart; } @@ -1347,6 +1348,7 @@ if (++YYCURSOR YYLIMIT *YYCURSOR == '\n') { /* match \r\n as single newline */ ++YYCURSOR; } + CG(zend_lineno)++; goto restart; } } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_language_scanner_defs.h?r1=1.9r2=1.10diff_format=u Index: ZendEngine2/zend_language_scanner_defs.h diff -u ZendEngine2/zend_language_scanner_defs.h:1.9 ZendEngine2/zend_language_scanner_defs.h:1.10 --- ZendEngine2/zend_language_scanner_defs.h:1.9Mon Jul 28 06:09:56 2008 +++ ZendEngine2/zend_language_scanner_defs.hWed Aug 13 06:17:15 2008 @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Mon Jul 28 15:05:16 2008 */ +/* Generated by re2c 0.13.5 on Tue Aug 12 20:42:02 2008 */ #line 3 Zend/zend_language_scanner_defs.h enum YYCONDTYPE { http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.194r2=1.195diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.194 php-src/sapi/cli/php_cli.c:1.195 --- php-src/sapi/cli/php_cli.c:1.194Wed Aug 13 00:49:59 2008 +++ php-src/sapi/cli/php_cli.c Wed Aug 13 06:17:15 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_cli.c,v 1.194 2008/08/13 00:49:59 jani Exp $ */ +/* $Id: php_cli.c,v 1.195 2008/08/13 06:17:15 dmitry Exp $ */ #include php.h #include php_globals.h @@ -590,23 +590,6 @@ return FAILURE; } file_handle-filename = script_file; - /* #!php support */ - c = fgetc(file_handle-handle.fp); - if (c == '#') { - while (c != '\n' c != '\r') { - c = fgetc(file_handle-handle.fp); /* skip to end of line */ - } - /* handle situations where line is terminated by \r\n */ - if (c == '\r') { - if (fgetc(file_handle-handle.fp) != '\n') { - long pos = ftell(file_handle-handle.fp); - fseek(file_handle-handle.fp, pos - 1, SEEK_SET); - } - } - *lineno = 2; - } else { - rewind(file_handle-handle.fp); - } return SUCCESS; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pspell pspell.c
tony2001Wed Aug 13 08:08:30 2008 UTC Modified files: /php-src/ext/pspell pspell.c Log: fix compile warnings (patch by Phil Oleson) http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.61r2=1.62diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.61 php-src/ext/pspell/pspell.c:1.62 --- php-src/ext/pspell/pspell.c:1.61Wed Jul 16 18:35:41 2008 +++ php-src/ext/pspell/pspell.c Wed Aug 13 08:08:30 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.61 2008/07/16 18:35:41 felipe Exp $ */ +/* $Id: pspell.c,v 1.62 2008/08/13 08:08:30 tony2001 Exp $ */ #define IS_EXT_MODULE @@ -374,7 +374,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s, pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -492,7 +492,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s, pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -526,7 +526,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s, pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } -- 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/pspell pspell.c
tony2001Wed Aug 13 08:08:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pspell pspell.c Log: MFH: fix compile warnings (patch by Phil Oleson) http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.7.2.4r2=1.45.2.4.2.7.2.5diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.4 php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.5 --- php-src/ext/pspell/pspell.c:1.45.2.4.2.7.2.4Wed Jul 16 18:34:56 2008 +++ php-src/ext/pspell/pspell.c Wed Aug 13 08:08:47 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.45.2.4.2.7.2.4 2008/07/16 18:34:56 felipe Exp $ */ +/* $Id: pspell.c,v 1.45.2.4.2.7.2.5 2008/08/13 08:08:47 tony2001 Exp $ */ #define IS_EXT_MODULE @@ -361,7 +361,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -471,7 +471,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -502,7 +502,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } -- 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/pspell pspell.c
tony2001Wed Aug 13 08:09:55 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pspell pspell.c Log: MFH: fix compile warnings (patch by Phil Oleson) http://cvs.php.net/viewvc.cgi/php-src/ext/pspell/pspell.c?r1=1.45.2.4.2.8r2=1.45.2.4.2.9diff_format=u Index: php-src/ext/pspell/pspell.c diff -u php-src/ext/pspell/pspell.c:1.45.2.4.2.8 php-src/ext/pspell/pspell.c:1.45.2.4.2.9 --- php-src/ext/pspell/pspell.c:1.45.2.4.2.8Mon Dec 31 07:20:10 2007 +++ php-src/ext/pspell/pspell.c Wed Aug 13 08:09:55 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pspell.c,v 1.45.2.4.2.8 2007/12/31 07:20:10 sebastian Exp $ */ +/* $Id: pspell.c,v 1.45.2.4.2.9 2008/08/13 08:09:55 tony2001 Exp $ */ #define IS_EXT_MODULE @@ -251,7 +251,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -374,7 +374,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } @@ -408,7 +408,7 @@ if(pspell_error_number(ret) != 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, PSPELL couldn't open the dictionary. reason: %s , pspell_error_message(ret)); - delete_pspell_manager(ret); + delete_pspell_can_have_error(ret); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / Makefile.global /ext/standard info.c /main php_ini.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/milter php_milter.c
Hi Jani, What is the reason of removing -n and -c option check in cli/cgi? It breaks two tests. Thanks. Dmitry. Jani Taskinen wrote: janiWed Aug 13 00:49:59 2008 UTC Modified files: /php-src Makefile.global /php-src/ext/standard info.c /php-src/main php_ini.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/milter php_milter.c Log: [DOC]- Added methods to change/disable --with-config-file-scan-dir=PATH at [DOC] startup: [DOC] [DOC] To disable: Override default php.ini by using both -c and -n with [DOC] CGI/CLI or set PHP_INI_SCAN_DIR environment variable [DOC] to an empty string. [DOC] [DOC] To change: Simply set PHP_INI_SCAN_DIR environment variable to point [DOC] to another path. - Fixed bug #42604 (make test fails with --with-config-file-scan-dir=/some/path) - Implemented FR #45114 (Option to change --with-config-file-scan-dir) -- 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
felipe Wed Aug 13 11:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: - BFN #45798 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.265r2=1.2027.2.547.2.965.2.266diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.265 php-src/NEWS:1.2027.2.547.2.965.2.266 --- php-src/NEWS:1.2027.2.547.2.965.2.265 Wed Aug 13 01:00:11 2008 +++ php-src/NEWSWed Aug 13 11:20:25 2008 @@ -15,6 +15,7 @@ - Fixed a bug causing miscalculations with the last weekday of n month relative time string. (Derick) +- Fixed bug #45798 (sqlite3 doesn't notice if variable was bound). (Felipe) - Fixed bug #45763 (mysqli::multi_query does not work with mysqlnd). (Johannes) - Fixed bug #45757 (FreeBSD4.11 build failure: failed include; stdint.h). (Hannes) -- 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/ming ming.c
tony2001Wed Aug 13 11:43:14 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ming ming.c Log: fix long/int issues and a typo http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.8.2.11r2=1.79.2.4.2.8.2.12diff_format=u Index: php-src/ext/ming/ming.c diff -u php-src/ext/ming/ming.c:1.79.2.4.2.8.2.11 php-src/ext/ming/ming.c:1.79.2.4.2.8.2.12 --- php-src/ext/ming/ming.c:1.79.2.4.2.8.2.11 Mon Aug 4 12:19:50 2008 +++ php-src/ext/ming/ming.c Wed Aug 13 11:43:14 2008 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ming.c,v 1.79.2.4.2.8.2.11 2008/08/04 12:19:50 tony2001 Exp $ */ +/* $Id: ming.c,v 1.79.2.4.2.8.2.12 2008/08/13 11:43:14 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1395,7 +1395,7 @@ PHP_FUNCTION(ming_keypress) { char *key; - long key_len; + int key_len; char c; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, key, key_len) == FAILURE) { @@ -4301,7 +4301,7 @@ SWFCharacter character; int ret; char *libswf, *name; - long libswf_len, name_len; + int libswf_len, name_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, libswf, libswf_len, name, name_len) == FAILURE) { return; @@ -4378,7 +4378,7 @@ PHP_METHOD(swfmovie, replace) { SWFMovie movie; - zval *zitem, **zblock; + zval *zitem, *zblock; SWFDisplayItem item; SWFBlock block; SWFMovieBlockType ublock; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gmp gmp.c
felipe Wed Aug 13 12:20:54 2008 UTC Modified files: /php-src/ext/gmpgmp.c Log: - New parameter parsing API (for gmp_testbit) http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/gmp.c?r1=1.68r2=1.69diff_format=u Index: php-src/ext/gmp/gmp.c diff -u php-src/ext/gmp/gmp.c:1.68 php-src/ext/gmp/gmp.c:1.69 --- php-src/ext/gmp/gmp.c:1.68 Wed Jan 30 18:26:08 2008 +++ php-src/ext/gmp/gmp.c Wed Aug 13 12:20:54 2008 @@ -1531,18 +1531,18 @@ Tests if bit is set in a */ ZEND_FUNCTION(gmp_testbit) { - zval **a_arg, **ind_arg; + zval *a_arg; + long ind_arg; int index; mpz_t *gmpnum_a; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, a_arg, ind_arg) == FAILURE){ - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rl, a_arg, ind_arg) == FAILURE) { + return; } - ZEND_FETCH_RESOURCE(gmpnum_a, mpz_t *, a_arg, -1, GMP_RESOURCE_NAME, le_gmp); + ZEND_FETCH_RESOURCE(gmpnum_a, mpz_t *, a_arg, -1, GMP_RESOURCE_NAME, le_gmp); - convert_to_long_ex(ind_arg); - index = Z_LVAL_PP(ind_arg); + index = ind_arg; if (index 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Index must be greater than or equal to zero); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/snmp snmp.c
felipe Wed Aug 13 14:05:56 2008 UTC Modified files: /php-src/ext/snmp snmp.c Log: - New parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.117r2=1.118diff_format=u Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.117 php-src/ext/snmp/snmp.c:1.118 --- php-src/ext/snmp/snmp.c:1.117 Tue Jul 1 19:14:28 2008 +++ php-src/ext/snmp/snmp.c Wed Aug 13 14:05:55 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: snmp.c,v 1.117 2008/07/01 19:14:28 felipe Exp $ */ +/* $Id: snmp.c,v 1.118 2008/08/13 14:05:55 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -785,60 +785,63 @@ */ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version) { - zval **a1, **a2, **a3, **a4, **a5, **a6, **a7; + char *a1, **a2, **a3; + int a1_len, a2_len, a3_len; + zval **a4 = NULL, **a5 = NULL; + long a6 = 0, a7 = 0; struct snmp_session session; - long timeout=SNMP_DEFAULT_TIMEOUT; - long retries=SNMP_DEFAULT_RETRIES; - int myargc = ZEND_NUM_ARGS(); + long timeout = SNMP_DEFAULT_TIMEOUT; + long retries = SNMP_DEFAULT_RETRIES; char type = (char) 0; char *value = (char *) 0; char hostname[MAX_NAME_LEN]; int remote_port = 161; char *pptr; + int argc = ZEND_NUM_ARGS(); - if (myargc 3 || myargc 7 || - zend_get_parameters_ex(myargc, a1, a2, a3, a4, a5, a6, a7) == FAILURE) { - WRONG_PARAM_COUNT; + if (st == SNMP_CMD_SET) { + if (zend_parse_parameters(argc TSRMLS_CC, sssZZ|ll, a1, a1_len, a2, a2_len, a3, a3_len, a4, a5, a6, a7) == FAILURE) { + return; + } + } else { + /* SNMP_CMD_GET +* SNMP_CMD_GETNEXT +* SNMP_CMD_WALK +* SNMP_CMD_REALWALK +*/ + if (zend_parse_parameters(argc TSRMLS_CC, sss|ZZ, a1, a1_len, a2, a2_len, a3, a3_len, a4, a5) == FAILURE) { + return; + } } - - convert_to_string_ex(a1); - convert_to_string_ex(a2); - convert_to_string_ex(a3); if (st == SNMP_CMD_SET) { - if (myargc 5) { - WRONG_PARAM_COUNT; - } - convert_to_string_ex(a4); convert_to_string_ex(a5); - if(myargc 5) { - convert_to_long_ex(a6); - timeout = Z_LVAL_PP(a6); + if (argc 5) { + timeout = a6; } - if(myargc 6) { - convert_to_long_ex(a7); - retries = Z_LVAL_PP(a7); + if (argc 6) { + retries = a7; } type = Z_STRVAL_PP(a4)[0]; value = Z_STRVAL_PP(a5); } else { - if(myargc 3) { + if (argc 3) { convert_to_long_ex(a4); timeout = Z_LVAL_PP(a4); } - if(myargc 4) { + if (argc 4) { convert_to_long_ex(a5); retries = Z_LVAL_PP(a5); } } snmp_sess_init(session); - strlcpy(hostname, Z_STRVAL_PP(a1), sizeof(hostname)); + strlcpy(hostname, a1, sizeof(hostname)); if ((pptr = strchr (hostname, ':'))) { remote_port = strtol (pptr + 1, NULL, 0); } @@ -853,17 +856,17 @@ * memory it did not allocate */ #ifdef UCD_SNMP_HACK - session.community = (u_char *)strdup(Z_STRVAL_PP(a2)); /* memory freed by SNMP library, strdup NOT estrdup */ + session.community = (u_char *)strdup(a2); /* memory freed by SNMP library, strdup NOT estrdup */ #else - session.community = (u_char *)Z_STRVAL_PP(a2); + session.community = (u_char *)a2; #endif - session.community_len = Z_STRLEN_PP(a2); + session.community_len = a2_len; session.retries = retries; session.timeout = timeout; session.authenticator = NULL; - php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, Z_STRVAL_PP(a3), type, value); + php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, a3, type, value); } /* }}} */ @@ -919,10 +922,9 @@ Return all objects including their respective object id withing the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - int argc = ZEND_NUM_ARGS(); long a1; - if (zend_parse_parameters(argc TSRMLS_CC, l, a1) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, a1) == FAILURE) { return; } @@ -939,10 +941,9 @@ Return all values that are enums with
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/snmp snmp.c
felipe Wed Aug 13 14:06:21 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/snmp snmp.c Log: - MFH: New parameter parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.5.2.4r2=1.106.2.2.2.5.2.5diff_format=u Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.4 php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.5 --- php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.4 Tue Jul 1 19:13:44 2008 +++ php-src/ext/snmp/snmp.c Wed Aug 13 14:06:21 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: snmp.c,v 1.106.2.2.2.5.2.4 2008/07/01 19:13:44 felipe Exp $ */ +/* $Id: snmp.c,v 1.106.2.2.2.5.2.5 2008/08/13 14:06:21 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -785,60 +785,63 @@ */ static void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st, int version) { - zval **a1, **a2, **a3, **a4, **a5, **a6, **a7; + char *a1, **a2, **a3; + int a1_len, a2_len, a3_len; + zval **a4 = NULL, **a5 = NULL; + long a6 = 0, a7 = 0; struct snmp_session session; - long timeout=SNMP_DEFAULT_TIMEOUT; - long retries=SNMP_DEFAULT_RETRIES; - int myargc = ZEND_NUM_ARGS(); + long timeout = SNMP_DEFAULT_TIMEOUT; + long retries = SNMP_DEFAULT_RETRIES; char type = (char) 0; char *value = (char *) 0; char hostname[MAX_NAME_LEN]; int remote_port = 161; char *pptr; + int argc = ZEND_NUM_ARGS(); - if (myargc 3 || myargc 7 || - zend_get_parameters_ex(myargc, a1, a2, a3, a4, a5, a6, a7) == FAILURE) { - WRONG_PARAM_COUNT; + if (st == SNMP_CMD_SET) { + if (zend_parse_parameters(argc TSRMLS_CC, sssZZ|ll, a1, a1_len, a2, a2_len, a3, a3_len, a4, a5, a6, a7) == FAILURE) { + return; + } + } else { + /* SNMP_CMD_GET +* SNMP_CMD_GETNEXT +* SNMP_CMD_WALK +* SNMP_CMD_REALWALK +*/ + if (zend_parse_parameters(argc TSRMLS_CC, sss|ZZ, a1, a1_len, a2, a2_len, a3, a3_len, a4, a5) == FAILURE) { + return; + } } - - convert_to_string_ex(a1); - convert_to_string_ex(a2); - convert_to_string_ex(a3); if (st == SNMP_CMD_SET) { - if (myargc 5) { - WRONG_PARAM_COUNT; - } - convert_to_string_ex(a4); convert_to_string_ex(a5); - if(myargc 5) { - convert_to_long_ex(a6); - timeout = Z_LVAL_PP(a6); + if (argc 5) { + timeout = a6; } - if(myargc 6) { - convert_to_long_ex(a7); - retries = Z_LVAL_PP(a7); + if (argc 6) { + retries = a7; } type = Z_STRVAL_PP(a4)[0]; value = Z_STRVAL_PP(a5); } else { - if(myargc 3) { + if (argc 3) { convert_to_long_ex(a4); timeout = Z_LVAL_PP(a4); } - if(myargc 4) { + if (argc 4) { convert_to_long_ex(a5); retries = Z_LVAL_PP(a5); } } snmp_sess_init(session); - strlcpy(hostname, Z_STRVAL_PP(a1), sizeof(hostname)); + strlcpy(hostname, a1, sizeof(hostname)); if ((pptr = strchr (hostname, ':'))) { remote_port = strtol (pptr + 1, NULL, 0); } @@ -853,17 +856,17 @@ * memory it did not allocate */ #ifdef UCD_SNMP_HACK - session.community = (u_char *)strdup(Z_STRVAL_PP(a2)); /* memory freed by SNMP library, strdup NOT estrdup */ + session.community = (u_char *)strdup(a2); /* memory freed by SNMP library, strdup NOT estrdup */ #else - session.community = (u_char *)Z_STRVAL_PP(a2); + session.community = (u_char *)a2; #endif - session.community_len = Z_STRLEN_PP(a2); + session.community_len = a2_len; session.retries = retries; session.timeout = timeout; session.authenticator = NULL; - php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, Z_STRVAL_PP(a3), type, value); + php_snmp_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, st, session, a3, type, value); } /* }}} */ @@ -919,10 +922,9 @@ Return all objects including their respective object id withing the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - int argc = ZEND_NUM_ARGS(); long a1; - if (zend_parse_parameters(argc TSRMLS_CC, l, a1) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, a1) == FAILURE)
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zen
2008/8/12 Felipe Pena [EMAIL PROTECTED]: felipe Tue Aug 12 17:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zend_constants.h zend_execute.c zend_execute.h zend_extensions.c zend_extensions.h zend_hash.c zend_hash.h zend_modules.h zend_object_handlers.c zend_object_handlers.h zend_objects.c zend_objects.h zend_objects_API.c zend_objects_API.h zend_operators.c zend_operators.h zend_stack.c zend_stack.h /php-src/ext/pdopdo_stmt.c /php-src/ext/phar phar.phar /php-src/main php_ini.c php_ini.h Log: - MFH: Constness (Added const qualifier to several function parameters) That breaks the windows build: zend_API.c Zend\zend_API.c(317) : error C2166: l-value specifies const object Zend\zend_API.c(351) : error C2166: l-value specifies const object Zend\zend_API.c(385) : error C2166: l-value specifies const object Zend\zend_API.c(386) : error C2166: l-value specifies const object Zend\zend_API.c(420) : error C2166: l-value specifies const object Zend\zend_API.c(442) : error C2166: l-value specifies const object Zend\zend_API.c(457) : error C2166: l-value specifies const object Zend\zend_API.c(472) : error C2166: l-value specifies const object Zend\zend_API.c(487) : error C2166: l-value specifies const object Zend\zend_API.c(502) : error C2166: l-value specifies const object Zend\zend_API.c(503) : error C2166: l-value specifies const object Zend\zend_API.c(524) : error C2166: l-value specifies const object Zend\zend_API.c(557) : error C2166: l-value specifies const object Zend\zend_API.c(558) : error C2166: l-value specifies const object Zend\zend_API.c(590) : error C2166: l-value specifies const object Zend\zend_API.c(601) : error C2166: l-value specifies const object Zend\zend_API.c(765) : error C2166: l-value specifies const object Zend\zend_API.c(766) : error C2166: l-value specifies const object zend_alloc.c Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- 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/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zen
Em Qua, 2008-08-13 às 17:58 +0200, Pierre Joye escreveu: 2008/8/12 Felipe Pena [EMAIL PROTECTED]: felipe Tue Aug 12 17:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zend_constants.h zend_execute.c zend_execute.h zend_extensions.c zend_extensions.h zend_hash.c zend_hash.h zend_modules.h zend_object_handlers.c zend_object_handlers.h zend_objects.c zend_objects.h zend_objects_API.c zend_objects_API.h zend_operators.c zend_operators.h zend_stack.c zend_stack.h /php-src/ext/pdopdo_stmt.c /php-src/ext/phar phar.phar /php-src/main php_ini.c php_ini.h Log: - MFH: Constness (Added const qualifier to several function parameters) That breaks the windows build: zend_API.c Zend\zend_API.c(317) : error C2166: l-value specifies const object Zend\zend_API.c(351) : error C2166: l-value specifies const object Zend\zend_API.c(385) : error C2166: l-value specifies const object Zend\zend_API.c(386) : error C2166: l-value specifies const object Zend\zend_API.c(420) : error C2166: l-value specifies const object Zend\zend_API.c(442) : error C2166: l-value specifies const object Zend\zend_API.c(457) : error C2166: l-value specifies const object Zend\zend_API.c(472) : error C2166: l-value specifies const object Zend\zend_API.c(487) : error C2166: l-value specifies const object Zend\zend_API.c(502) : error C2166: l-value specifies const object Zend\zend_API.c(503) : error C2166: l-value specifies const object Zend\zend_API.c(524) : error C2166: l-value specifies const object Zend\zend_API.c(557) : error C2166: l-value specifies const object Zend\zend_API.c(558) : error C2166: l-value specifies const object Zend\zend_API.c(590) : error C2166: l-value specifies const object Zend\zend_API.c(601) : error C2166: l-value specifies const object Zend\zend_API.c(765) : error C2166: l-value specifies const object Zend\zend_API.c(766) : error C2166: l-value specifies const object zend_alloc.c Ouch. I commited a possible fix. Try it please. Thanks. Cheers, -- Regards, Felipe Pena. -- 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) /main php_ini.c
pajoye Wed Aug 13 17:49:14 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main php_ini.c Log: - move declaration on top and fix build error http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.10r2=1.136.2.4.2.15.2.11diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.136.2.4.2.15.2.10 php-src/main/php_ini.c:1.136.2.4.2.15.2.11 --- php-src/main/php_ini.c:1.136.2.4.2.15.2.10 Wed Aug 13 00:53:28 2008 +++ php-src/main/php_ini.c Wed Aug 13 17:49:13 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.136.2.4.2.15.2.10 2008/08/13 00:53:28 jani Exp $ */ +/* $Id: php_ini.c,v 1.136.2.4.2.15.2.11 2008/08/13 17:49:13 pajoye Exp $ */ #include php.h #include ext/standard/info.h @@ -340,6 +340,7 @@ { char *php_ini_file_name = NULL; char *php_ini_search_path = NULL; + int php_ini_scanned_path_len; int safe_mode_state; char *open_basedir; int free_ini_search_path = 0; @@ -602,7 +603,7 @@ /* Or fall back using possible --with-config-file-scan-dir setting (defaults to empty string!) */ php_ini_scanned_path = PHP_CONFIG_FILE_SCAN_DIR; } - int php_ini_scanned_path_len = strlen(php_ini_scanned_path); + php_ini_scanned_path_len = strlen(php_ini_scanned_path); /* Scan and parse any .ini files found in scan path if path not empty. */ if (!sapi_module.php_ini_ignore php_ini_scanned_path_len) { -- 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/ming ming.c
felipe Wed Aug 13 19:06:10 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ming ming.c Log: - Fixed build (ZTS) http://cvs.php.net/viewvc.cgi/php-src/ext/ming/ming.c?r1=1.79.2.4.2.8.2.12r2=1.79.2.4.2.8.2.13diff_format=u Index: php-src/ext/ming/ming.c diff -u php-src/ext/ming/ming.c:1.79.2.4.2.8.2.12 php-src/ext/ming/ming.c:1.79.2.4.2.8.2.13 --- php-src/ext/ming/ming.c:1.79.2.4.2.8.2.12 Wed Aug 13 11:43:14 2008 +++ php-src/ext/ming/ming.c Wed Aug 13 19:06:10 2008 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: ming.c,v 1.79.2.4.2.8.2.12 2008/08/13 11:43:14 tony2001 Exp $ */ +/* $Id: ming.c,v 1.79.2.4.2.8.2.13 2008/08/13 19:06:10 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2731,7 +2731,7 @@ */ /* helper functions */ -static SWFColor hashToColor(zval **colorHash) +static SWFColor hashToColor(zval **colorHash TSRMLS_DC) { zval **data; HashPosition pointer; @@ -2779,7 +2779,7 @@ return c; } -static SWFFilter createDropShadowFilter(int argc, zval **argv[]) +static SWFFilter createDropShadowFilter(int argc, zval **argv[] TSRMLS_DC) { zval **colorHash, **blur, **shadow, **flags; SWFColor c; @@ -2789,7 +2789,7 @@ colorHash = argv[1]; convert_to_array_ex(colorHash); - c = hashToColor(colorHash); + c = hashToColor(colorHash TSRMLS_CC); blur = argv[2]; convert_to_object_ex(blur); @@ -2804,7 +2804,7 @@ getShadow(*shadow TSRMLS_CC), Z_LVAL_PP(flags)); } -static SWFFilter createBlurFilter(int argc, zval **argv[]) +static SWFFilter createBlurFilter(int argc, zval **argv[] TSRMLS_DC) { zval **blur; @@ -2817,7 +2817,7 @@ return newBlurFilter(getBlur(*blur TSRMLS_CC)); } -static SWFFilter createGlowFilter(int argc, zval **argv[]) +static SWFFilter createGlowFilter(int argc, zval **argv[] TSRMLS_DC) { zval **color, **blur, **strength, **flags; SWFColor c; @@ -2827,7 +2827,7 @@ color = argv[1]; convert_to_array_ex(color); - c = hashToColor(color); + c = hashToColor(color TSRMLS_CC); blur = argv[2]; convert_to_object_ex(blur); @@ -2842,7 +2842,7 @@ Z_DVAL_PP(strength), Z_LVAL_PP(flags)); } -static SWFFilter createBevelFilter(int argc, zval **argv[]) +static SWFFilter createBevelFilter(int argc, zval **argv[] TSRMLS_DC) { zval **sColor, **hColor, **blur, **shadow, **flags; SWFColor hc, sc; @@ -2852,11 +2852,11 @@ sColor = argv[1]; convert_to_array_ex(sColor); - sc = hashToColor(sColor); + sc = hashToColor(sColor TSRMLS_CC); hColor = argv[2]; convert_to_array_ex(hColor); - hc = hashToColor(hColor); + hc = hashToColor(hColor TSRMLS_CC); blur = argv[3]; convert_to_object_ex(blur); @@ -2871,7 +2871,7 @@ getShadow(*shadow TSRMLS_CC), Z_LVAL_PP(flags)); } -static SWFFilter createGradientGlowFilter(int argc, zval **argv[]) +static SWFFilter createGradientGlowFilter(int argc, zval **argv[] TSRMLS_DC) { zval **gradient, **blur, **shadow, **flags; @@ -2895,7 +2895,7 @@ Z_LVAL_PP(flags)); } -static SWFFilter createConvolutionFilter(int argc, zval **argv[]) +static SWFFilter createConvolutionFilter(int argc, zval **argv[] TSRMLS_DC) { zval **matrix, **div, **bias, **color, **flags; SWFColor c; @@ -2914,7 +2914,7 @@ color = argv[4]; convert_to_array_ex(color); - c = hashToColor(color); + c = hashToColor(color TSRMLS_CC); flags = argv[5]; convert_to_long_ex(flags); @@ -2923,7 +2923,7 @@ Z_DVAL_PP(bias), c, Z_LVAL_PP(flags)); } -static SWFFilter createColorMatrixFilter(int argc, zval **argv[]) +static SWFFilter createColorMatrixFilter(int argc, zval **argv[] TSRMLS_DC) { zval **matrix; @@ -2936,7 +2936,7 @@ return newColorMatrixFilter(getFilterMatrix(*matrix TSRMLS_CC)); } -static SWFFilter createGradientBevelFilter(int argc, zval **argv[]) +static SWFFilter createGradientBevelFilter(int argc, zval **argv[] TSRMLS_DC) { zval **gradient, **blur, **shadow, **flags; @@ -3009,28 +3009,28 @@ switch(type) { case SWFFILTER_TYPE_DROPSHADOW: - filter = createDropShadowFilter(argc, argv); + filter = createDropShadowFilter(argc, argv TSRMLS_CC); break; case SWFFILTER_TYPE_BLUR: - filter = createBlurFilter(argc, argv); + filter = createBlurFilter(argc, argv TSRMLS_CC); break; case SWFFILTER_TYPE_GLOW: - filter = createGlowFilter(argc, argv); + filter = createGlowFilter(argc, argv TSRMLS_CC); break; case SWFFILTER_TYPE_BEVEL: -
Re: [PHP-CVS] cvs: php-src /ext/phar func_interceptors.c
What exactly was merged to fix/change/what? HEAD has the log now with just 'MFB'..wtf? Please, follow the rules.. --Jani Marcus Boerger [EMAIL PROTECTED] kirjoitti: helly Tue Aug 12 15:37:36 2008 UTC Modified files: /php-src/ext/phar func_interceptors.c Log: - MFB http://cvs.php.net/viewvc.cgi/php-src/ext/phar/func_interceptors.c?r1=1.23r2=1.24diff_format=u Index: php-src/ext/phar/func_interceptors.c diff -u php-src/ext/phar/func_interceptors.c:1.23 php-src/ext/phar/func_interceptors.c:1.24 --- php-src/ext/phar/func_interceptors.c:1.23 Fri Aug 1 13:45:05 2008 +++ php-src/ext/phar/func_interceptors.cTue Aug 12 15:37:36 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: func_interceptors.c,v 1.23 2008/08/01 13:45:05 sfox Exp $ */ +/* $Id: func_interceptors.c,v 1.24 2008/08/12 15:37:36 helly Exp $ */ #include phar_internal.h @@ -950,7 +950,9 @@ } } } - efree(entry); + if (entry != filename) { + efree(entry); + } efree(arch); RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-internals-win /script snapshot.bat
pajoye Wed Aug 13 19:43:25 2008 UTC Modified files: /php-internals-win/script snapshot.bat Log: - #45807, wrong file copied for the debug pack http://cvs.php.net/viewvc.cgi/php-internals-win/script/snapshot.bat?r1=1.4r2=1.5diff_format=u Index: php-internals-win/script/snapshot.bat diff -u php-internals-win/script/snapshot.bat:1.4 php-internals-win/script/snapshot.bat:1.5 --- php-internals-win/script/snapshot.bat:1.4 Fri Aug 8 10:12:34 2008 +++ php-internals-win/script/snapshot.bat Wed Aug 13 19:43:25 2008 @@ -63,7 +63,7 @@ copy %PHP_ZIP_FILE% %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip SET PHPDEBUG_ZIP_FILE=Release_TS\php-debug-pack-%_PHPVERSION_STRING%-Win32.zip -copy %PHP_ZIP_FILE% %START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip +copy %PHPDEBUG_ZIP_FILE% %START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip REM Using -i now REM %PUTTYBASE%pageant.exe %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -- 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) / NEWS
janiWed Aug 13 19:43:48 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: typoh http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1198r2=1.2027.2.547.2.1199diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1198 php-src/NEWS:1.2027.2.547.2.1199 --- php-src/NEWS:1.2027.2.547.2.1198Wed Aug 13 07:19:39 2008 +++ php-src/NEWSWed Aug 13 19:43:48 2008 @@ -19,7 +19,7 @@ - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) -- Fixed bug #45805 (Crach on throwing exception from error handler). (Dmitry) +- Fixed bug #45805 (Crash on throwing exception from error handler). (Dmitry) - Fixed bug #45765 (ReflectionObject with default parameters of self::xxx cause an error). (Felipe) - Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter). -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / Makefile.global /ext/standard info.c /main php_ini.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /sapi/milter php_milter.c
Because it didn't make sense not to allow using both. I thought I fixed those tests..? Or which ones do you mean? --Jani Dmitry Stogov [EMAIL PROTECTED] kirjoitti: Hi Jani, What is the reason of removing -n and -c option check in cli/cgi? It breaks two tests. Thanks. Dmitry. Jani Taskinen wrote: jani Wed Aug 13 00:49:59 2008 UTC Modified files: /php-src Makefile.global /php-src/ext/standard info.c /php-src/main php_ini.c /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c /php-src/sapi/milter php_milter.c Log: [DOC]- Added methods to change/disable --with-config-file-scan-dir=PATH at [DOC] startup: [DOC] [DOC] To disable: Override default php.ini by using both -c and -n with [DOC] CGI/CLI or set PHP_INI_SCAN_DIR environment variable [DOC] to an empty string. [DOC] [DOC] To change: Simply set PHP_INI_SCAN_DIR environment variable to point [DOC] to another path. - Fixed bug #42604 (make test fails with --with-config-file-scan-dir=/some/path) - Implemented FR #45114 (Option to change --with-config-file-scan-dir) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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) /main php_ini.c
So the build was only broken for PHP_5_3 and not HEAD and PHP_5_2? --Jani Pierre-Alain Joye [EMAIL PROTECTED] kirjoitti: pajoye Wed Aug 13 17:49:14 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main php_ini.c Log: - move declaration on top and fix build error http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.10r2=1.136.2.4.2.15.2.11diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.136.2.4.2.15.2.10 php-src/main/php_ini.c:1.136.2.4.2.15.2.11 --- php-src/main/php_ini.c:1.136.2.4.2.15.2.10 Wed Aug 13 00:53:28 2008 +++ php-src/main/php_ini.c Wed Aug 13 17:49:13 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.136.2.4.2.15.2.10 2008/08/13 00:53:28 jani Exp $ */ +/* $Id: php_ini.c,v 1.136.2.4.2.15.2.11 2008/08/13 17:49:13 pajoye Exp $ */ #include php.h #include ext/standard/info.h @@ -340,6 +340,7 @@ { char *php_ini_file_name = NULL; char *php_ini_search_path = NULL; + int php_ini_scanned_path_len; int safe_mode_state; char *open_basedir; int free_ini_search_path = 0; @@ -602,7 +603,7 @@ /* Or fall back using possible --with-config-file-scan-dir setting (defaults to empty string!) */ php_ini_scanned_path = PHP_CONFIG_FILE_SCAN_DIR; } - int php_ini_scanned_path_len = strlen(php_ini_scanned_path); + php_ini_scanned_path_len = strlen(php_ini_scanned_path); /* Scan and parse any .ini files found in scan path if path not empty. */ if (!sapi_module.php_ini_ignore php_ini_scanned_path_len) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- 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) /main php_ini.c
hi Jani, On Wed, Aug 13, 2008 at 9:58 PM, Jani Taskinen [EMAIL PROTECTED] wrote: So the build was only broken for PHP_5_3 and not HEAD and PHP_5_2? I admit that I did not check 5.2, but did not find this code in HEAD. Checking again :) Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-internals-win /script snapshot.bat
pajoye Wed Aug 13 21:28:02 2008 UTC Modified files: /php-internals-win/script snapshot.bat Log: - add a LOG_DIR var, add logs for the ssh transfert and configure, copy the log per build in the log dir http://cvs.php.net/viewvc.cgi/php-internals-win/script/snapshot.bat?r1=1.5r2=1.6diff_format=u Index: php-internals-win/script/snapshot.bat diff -u php-internals-win/script/snapshot.bat:1.5 php-internals-win/script/snapshot.bat:1.6 --- php-internals-win/script/snapshot.bat:1.5 Wed Aug 13 19:43:25 2008 +++ php-internals-win/script/snapshot.bat Wed Aug 13 21:28:01 2008 @@ -5,6 +5,7 @@ IF EXIST %PHP_SDK_PATH%\snaps.lock ECHO Snapshot script is already running GOTO EXIT +SET LOG_DIR=%PHP_SDK_PATH%\log SET START=%CD% echo LOCKED %PHP_SDK_PATH%\snaps.lock IF %1== GOTO HELP @@ -50,7 +51,7 @@ cd %DEST% call buildconf.bat %START%\buildconf.log 21 -call configure.bat --enable-snapshot-build --enable-debug-pack --disable-fileinfo --with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared %START%\compile.log 21 +call configure.bat --enable-snapshot-build --enable-debug-pack --disable-fileinfo --with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared %START%\configure.log 21 nmake snap %START%\compile.log 21 @@ -68,11 +69,18 @@ REM Using -i now REM %PUTTYBASE%pageant.exe %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk %PUTTYBASE%plink.exe -batch -l %REMOTE_USER% -m %PHP_SDK_PATH%script\snap_delete_old.sh snaps.php.net -%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip %SSH_URL%:%REMOTE_PATH% -%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip %SSH_URL%:%REMOTE_PATH% -%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\compile.log %SSH_URL%:%REMOTE_PATH%/compile-%_PHPVERSION_SHORT%.log -%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\cvs.log %SSH_URL%:%REMOTE_PATH%/cvs-%_PHPVERSION_SHORT%.log -%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\buildconf.log %SSH_URL%:%REMOTE_PATH%/buildconf-%_PHPVERSION_SHORT%.log +%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip %SSH_URL%:%REMOTE_PATH% %LOG_DIR%\scp_%SNAPDATETIME%.log 21 +%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip %SSH_URL%:%REMOTE_PATH% %LOG_DIR%\scp_%SNAPDATETIME%.log 21 +%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\compile.log %SSH_URL%:%REMOTE_PATH%/compile-%_PHPVERSION_SHORT%.log %LOG_DIR%\scp_%SNAPDATETIME%.log 21 +%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\cvs.log %SSH_URL%:%REMOTE_PATH%/cvs-%_PHPVERSION_SHORT%.log %LOG_DIR%\scp_%SNAPDATETIME%.log 21 +%PUTTYBASE%pscp.exe -batch -q -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\buildconf.log %SSH_URL%:%REMOTE_PATH%/buildconf-%_PHPVERSION_SHORT%.log %LOG_DIR%\scp_%SNAPDATETIME%.log 21 + +del %START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip +del %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip +copy %START%\compile.log %LOG_DIR%\compile_%SNAPDATETIME%.log +copy %START%\cvs.log %LOG_DIR%\cvs_%SNAPDATETIME%.log +copy %START%\buildconf.log %LOG_DIR%\buildconf_%SNAPDATETIME%.log +copy %START%\configure.log %LOG_DIR%\configure_%SNAPDATETIME%.log GOTO EXIT -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php_ini.c
pajoye Wed Aug 13 21:51:54 2008 UTC Modified files: /php-src/main php_ini.c Log: - MFB: move declaration on top and fix build error http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.168r2=1.169diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.168 php-src/main/php_ini.c:1.169 --- php-src/main/php_ini.c:1.168Wed Aug 13 00:49:59 2008 +++ php-src/main/php_ini.c Wed Aug 13 21:51:54 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.168 2008/08/13 00:49:59 jani Exp $ */ +/* $Id: php_ini.c,v 1.169 2008/08/13 21:51:54 pajoye Exp $ */ #include php.h #include ext/standard/info.h @@ -340,6 +340,7 @@ { char *php_ini_file_name = NULL; char *php_ini_search_path = NULL; + int php_ini_scanned_path_len; char *open_basedir; int free_ini_search_path = 0; zend_file_handle fh; @@ -598,7 +599,7 @@ /* Or fall back using possible --with-config-file-scan-dir setting (defaults to empty string!) */ php_ini_scanned_path = PHP_CONFIG_FILE_SCAN_DIR; } - int php_ini_scanned_path_len = strlen(php_ini_scanned_path); + php_ini_scanned_path_len = strlen(php_ini_scanned_path); /* Scan and parse any .ini files found in scan path if path not empty. */ if (!sapi_module.php_ini_ignore php_ini_scanned_path_len) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c
pajoye Wed Aug 13 21:57:00 2008 UTC Modified files: /php-src/ext/reflection php_reflection.c Log: - move declaration on top and fix build error http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.315r2=1.316diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.315 php-src/ext/reflection/php_reflection.c:1.316 --- php-src/ext/reflection/php_reflection.c:1.315 Mon Aug 11 22:30:44 2008 +++ php-src/ext/reflection/php_reflection.c Wed Aug 13 21:57:00 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.315 2008/08/11 22:30:44 cseiler Exp $ */ +/* $Id: php_reflection.c,v 1.316 2008/08/13 21:57:00 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -3357,9 +3357,9 @@ zend_function *closure; if (mptr-common.fn_flags filter) { - ALLOC_ZVAL(method); unsigned int lc_name_len; zstr lc_name = zend_u_str_case_fold(ZEND_STR_TYPE, mptr-common.function_name, len, 1, lc_name_len); + ALLOC_ZVAL(method); if (ce == zend_ce_closure obj (lc_name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) ZEND_U_EQUAL(ZEND_STR_TYPE, lc_name, lc_name_len, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) (closure = zend_get_closure_invoke_method(obj TSRMLS_CC)) != NULL) @@ -5423,7 +5423,7 @@ php_info_print_table_start(); php_info_print_table_header(2, Reflection, enabled); - php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.315 2008/08/11 22:30:44 cseiler Exp $); + php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.316 2008/08/13 21:57:00 pajoye Exp $); php_info_print_table_end(); } /* }}} */ -- 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) /main php.h /win32 time.c
kalle Wed Aug 13 22:40:39 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main php.h /php-src/win32 time.c Log: MFH: * Remove NTDDI_VERSION declaring and use the one in config.w32.h * Remove another _WIN32_WINNT macro redef in win32/time.c http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.221.2.4.2.8.2.8r2=1.221.2.4.2.8.2.9diff_format=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.221.2.4.2.8.2.8 php-src/main/php.h:1.221.2.4.2.8.2.9 --- php-src/main/php.h:1.221.2.4.2.8.2.8Fri Aug 8 17:47:24 2008 +++ php-src/main/php.h Wed Aug 13 22:40:39 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.221.2.4.2.8.2.8 2008/08/08 17:47:24 helly Exp $ */ +/* $Id: php.h,v 1.221.2.4.2.8.2.9 2008/08/13 22:40:39 kalle Exp $ */ #ifndef PHP_H #define PHP_H @@ -54,12 +54,6 @@ # endif # define PHP_DIR_SEPARATOR '\\' # define PHP_EOL \r\n -# if defined(NTDDI_VERSION) NTDDI_VERSION = 0x0600 -# undef NTDDI_VERSION -# endif -# ifndef NTDDI_VERSION -# define NTDDI_VERSION 0x0500 -# endif #else # if defined(__GNUC__) __GNUC__ = 4 # define PHPAPI __attribute__ ((visibility(default))) http://cvs.php.net/viewvc.cgi/php-src/win32/time.c?r1=1.10r2=1.10.6.1diff_format=u Index: php-src/win32/time.c diff -u php-src/win32/time.c:1.10 php-src/win32/time.c:1.10.6.1 --- php-src/win32/time.c:1.10 Thu Jul 29 02:59:43 2004 +++ php-src/win32/time.cWed Aug 13 22:40:39 2008 @@ -11,7 +11,7 @@ * */ -/* $Id: time.c,v 1.10 2004/07/29 02:59:43 wez Exp $ */ +/* $Id: time.c,v 1.10.6.1 2008/08/13 22:40:39 kalle Exp $ */ /** * @@ -22,10 +22,6 @@ /* Include stuff */ -/* this allows the use of the WaitableTimer functions. - * For win98 and later */ -#define _WIN32_WINNT 0x400 - #include time.h #include unistd.h #include signal.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard crypt_blowfish.c php_crypt_r.h
felipe Thu Aug 14 01:13:18 2008 UTC Modified files: /php-src/ext/standard crypt_blowfish.c php_crypt_r.h Log: - Fix build on BSD (5_3 and 5_2 are OK) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_blowfish.c?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/crypt_blowfish.c diff -u php-src/ext/standard/crypt_blowfish.c:1.1 php-src/ext/standard/crypt_blowfish.c:1.2 --- php-src/ext/standard/crypt_blowfish.c:1.1 Mon Jul 28 11:34:53 2008 +++ php-src/ext/standard/crypt_blowfish.c Thu Aug 14 01:13:18 2008 @@ -1,5 +1,5 @@ /* - $Id: crypt_blowfish.c,v 1.1 2008/07/28 11:34:53 pajoye Exp $ + $Id: crypt_blowfish.c,v 1.2 2008/08/14 01:13:18 felipe Exp $ */ /* * This code comes from John the Ripper password cracker, with reentrant @@ -47,6 +47,8 @@ #else #define __CONST #endif +#else +#define __CONST __const #endif #ifdef __i386__ http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_crypt_r.h?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/php_crypt_r.h diff -u php-src/ext/standard/php_crypt_r.h:1.1 php-src/ext/standard/php_crypt_r.h:1.2 --- php-src/ext/standard/php_crypt_r.h:1.1 Mon Jul 28 11:34:53 2008 +++ php-src/ext/standard/php_crypt_r.h Thu Aug 14 01:13:18 2008 @@ -1,4 +1,4 @@ -/* $Id: php_crypt_r.h,v 1.1 2008/07/28 11:34:53 pajoye Exp $ */ +/* $Id: php_crypt_r.h,v 1.2 2008/08/14 01:13:18 felipe Exp $ */ /* +--+ | PHP Version 5| @@ -32,6 +32,8 @@ #else #define __CONST #endif +#else +#define __CONST __const #endif void php_init_crypt_r(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c string.c
kalle Thu Aug 14 02:55:14 2008 UTC Modified files: /php-src/ext/standard basic_functions.c string.c Log: Implemented feature request #34381 (nl2br() should have an option for XHTML/HTML compatible BR element) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.913r2=1.914diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.913 php-src/ext/standard/basic_functions.c:1.914 --- php-src/ext/standard/basic_functions.c:1.913Thu Aug 7 09:24:04 2008 +++ php-src/ext/standard/basic_functions.c Thu Aug 14 02:55:13 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.913 2008/08/07 09:24:04 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.914 2008/08/14 02:55:13 kalle Exp $ */ #include php.h #include php_streams.h @@ -2742,6 +2742,7 @@ static ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0) ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, is_xhtml) ZEND_END_ARG_INFO() static http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.678r2=1.679diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.678 php-src/ext/standard/string.c:1.679 --- php-src/ext/standard/string.c:1.678 Tue Jul 29 16:51:21 2008 +++ php-src/ext/standard/string.c Thu Aug 14 02:55:13 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.678 2008/07/29 16:51:21 felipe Exp $ */ +/* $Id: string.c,v 1.679 2008/08/14 02:55:13 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -5978,19 +5978,20 @@ } /* }}} */ -/* {{{ proto string nl2br(string str) U +/* {{{ proto string nl2br(string str [, bool is_xhtml]) U Converts newlines to HTML line breaks */ PHP_FUNCTION(nl2br) { - /* in brief this inserts br / before matched regexp \n\r?|\r\n? */ - zstrstr; - int str_len; - zend_uchar str_type; - zstrp, end, tmp, target; + /* in brief this inserts br / or br before matched regexp \n\r?|\r\n? */ + zstrstr; + int str_len; + zend_uchar str_type; + zstrp, end, tmp, target; int new_length; int repl_cnt = 0; + zend_bool is_xhtml = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, str, str_len, str_type) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t|b, str, str_len, str_type, is_xhtml) == FAILURE) { return; } @@ -6038,7 +6039,11 @@ RETURN_ZSTRL(str_type, str, str_len, 1); } - new_length = str_len + repl_cnt * (sizeof(br /) - 1); + if (is_xhtml) { + new_length = str_len + repl_cnt * (sizeof(br /) - 1); + } else { + new_length = str_len + repl_cnt * (sizeof(br) - 1); + } if (str_type == IS_UNICODE) { tmp.u = target.u = eumalloc(new_length + 1); @@ -6051,8 +6056,12 @@ *target.u++ = (UChar) 0x3c /*''*/; *target.u++ = (UChar) 0x62 /*'b'*/; *target.u++ = (UChar) 0x72 /*'r'*/; - *target.u++ = (UChar) 0x20 /*' '*/; - *target.u++ = (UChar) 0x2f /*'/'*/; + + if (is_xhtml) { + *target.u++ = (UChar) 0x20 /*' '*/; + *target.u++ = (UChar) 0x2f /*'/'*/; + } + *target.u++ = (UChar) 0x3e /*''*/; if ((*p.u == (UChar) 0x0d /*'\r'*/ *(p.u+1) == (UChar) 0x0a /*'\n'*/) @@ -6079,8 +6088,12 @@ *target.s++ = ''; *target.s++ = 'b'; *target.s++ = 'r'; - *target.s++ = ' '; - *target.s++ = '/'; + + if (is_xhtml) { + *target.s++ = ' '; + *target.s++ = '/'; + } + *target.s++ = ''; if ((*p.s == '\r' *(p.s+1) == '\n') || (*p.s == '\n' *(p.s+1) == '\r')) { -- 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 basic_functions.c string.c
kalle Thu Aug 14 02:56:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard basic_functions.c string.c Log: MFH: Implemented feature request #34381 (nl2br() should have an option for XHTML/HTML compatible BR element) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.266r2=1.2027.2.547.2.965.2.267diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.266 php-src/NEWS:1.2027.2.547.2.965.2.267 --- php-src/NEWS:1.2027.2.547.2.965.2.266 Wed Aug 13 11:20:25 2008 +++ php-src/NEWSThu Aug 14 02:56:22 2008 @@ -12,6 +12,9 @@ - Added litespeed SAPI module. (George Wang) - Added ext/hash support to ext/session's ID generator. (Sara) +- Implemented feature request #34381 (nl2br() should have an option for + XHTML/HTML compatible BR element) (Kalle) + - Fixed a bug causing miscalculations with the last weekday of n month relative time string. (Derick) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.46r2=1.725.2.31.2.64.2.47diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.47 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.46 Thu Aug 7 09:25:32 2008 +++ php-src/ext/standard/basic_functions.c Thu Aug 14 02:56:22 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.46 2008/08/07 09:25:32 lbarnaud Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.47 2008/08/14 02:56:22 kalle Exp $ */ #include php.h #include php_streams.h @@ -2739,6 +2739,7 @@ static ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0) ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, is_xhtml) ZEND_END_ARG_INFO() static http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.33r2=1.445.2.14.2.69.2.34diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.33 php-src/ext/standard/string.c:1.445.2.14.2.69.2.34 --- php-src/ext/standard/string.c:1.445.2.14.2.69.2.33 Thu Jul 31 14:20:40 2008 +++ php-src/ext/standard/string.c Thu Aug 14 02:56:23 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.445.2.14.2.69.2.33 2008/07/31 14:20:40 ohill Exp $ */ +/* $Id: string.c,v 1.445.2.14.2.69.2.34 2008/08/14 02:56:23 kalle Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -3887,18 +3887,19 @@ } /* }}} */ -/* {{{ proto string nl2br(string str) +/* {{{ proto string nl2br(string str [, bool is_xhtml]) Converts newlines to HTML line breaks */ PHP_FUNCTION(nl2br) { - /* in brief this inserts br / before matched regexp \n\r?|\r\n? */ - char*tmp, *str; - int new_length; - char*end, *target; - int repl_cnt = 0; - int str_len; + /* in brief this inserts br / or br before matched regexp \n\r?|\r\n? */ + char*tmp, *str; + int new_length; + char*end, *target; + int repl_cnt = 0; + int str_len; + zend_bool is_xhtml = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, str, str_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|b, str, str_len, is_xhtml) == FAILURE) { return; } @@ -3927,7 +3928,12 @@ RETURN_STRINGL(str, str_len, 1); } - new_length = str_len + repl_cnt * (sizeof(br /) - 1); + if (is_xhtml) { + new_length = str_len + repl_cnt * (sizeof(br /) - 1); + } else { + new_length = str_len + repl_cnt * (sizeof(br) - 1); + } + tmp = target = emalloc(new_length + 1); while (str end) { @@ -3937,8 +3943,12 @@ *target++ = ''; *target++ = 'b'; *target++ = 'r'; - *target++ = ' '; - *target++ = '/'; + + if (is_xhtml) { + *target++ = ' '; + *target++ = '/'; + } + *target++ = ''; if ((*str == '\r' *(str+1) == '\n') || (*str == '\n' *(str+1) == '\r')) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php.h /win32 time.c
kalle Wed Aug 13 22:39:33 2008 UTC Modified files: /php-src/main php.h /php-src/win32 time.c Log: * Remove NTDDI_VERSION declaring and use the one in config.w32.h * Remove another _WIN32_WINNT macro redef in win32/time.c http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.247r2=1.248diff_format=u Index: php-src/main/php.h diff -u php-src/main/php.h:1.247 php-src/main/php.h:1.248 --- php-src/main/php.h:1.247Fri Aug 8 17:10:49 2008 +++ php-src/main/php.h Wed Aug 13 22:39:33 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.247 2008/08/08 17:10:49 helly Exp $ */ +/* $Id: php.h,v 1.248 2008/08/13 22:39:33 kalle Exp $ */ #ifndef PHP_H #define PHP_H @@ -54,12 +54,6 @@ # endif # define PHP_DIR_SEPARATOR '\\' # define PHP_EOL \r\n -# if defined(NTDDI_VERSION) NTDDI_VERSION = 0x0600 -# undef NTDDI_VERSION -# endif -# ifndef NTDDI_VERSION -# define NTDDI_VERSION 0x0500 -# endif #else # if defined(__GNUC__) __GNUC__ = 4 # define PHPAPI __attribute__ ((visibility(default))) http://cvs.php.net/viewvc.cgi/php-src/win32/time.c?r1=1.10r2=1.11diff_format=u Index: php-src/win32/time.c diff -u php-src/win32/time.c:1.10 php-src/win32/time.c:1.11 --- php-src/win32/time.c:1.10 Thu Jul 29 02:59:43 2004 +++ php-src/win32/time.cWed Aug 13 22:39:33 2008 @@ -11,7 +11,7 @@ * */ -/* $Id: time.c,v 1.10 2004/07/29 02:59:43 wez Exp $ */ +/* $Id: time.c,v 1.11 2008/08/13 22:39:33 kalle Exp $ */ /** * @@ -22,10 +22,6 @@ /* Include stuff */ -/* this allows the use of the WaitableTimer functions. - * For win98 and later */ -#define _WIN32_WINNT 0x400 - #include time.h #include unistd.h #include signal.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php