[PHP-CVS] svn: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/ money_format_basic1.phpt money_format_basic2.phpt money_format_basic3.phpt money_format_error.phpt money_format_variation1.phpt
indeyetsFri, 17 Jul 2009 15:56:36 + URL: http://svn.php.net/viewvc?view=revisionrevision=284272 Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic1.phpt D php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic2.phpt D php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic3.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_error.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_variation1.phpt U php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_variation2.phpt Log: fixed tests. money_format() is implemented in underlying system, not in php. So, we shouldn't test for actual values returned. They are different between systems Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic1.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 15:33:21 UTC (rev 284271) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 15:56:36 UTC (rev 284272) @@ -2,13 +2,9 @@ Test money_format() function : basic functionality using national currency symbols --SKIPIF-- ?php - if (!function_exists('money_format') || !function_exists('setlocale')) { + if (!function_exists('money_format')) { die(SKIP money_format - not supported\n); } - - if (setlocale(LC_MONETARY, 'en_US') == false) { - die(SKIP en_US locale not available\n); - } ? --FILE-- ?php @@ -17,9 +13,11 @@ * Source code: ext/standard/string.c */ -echo *** Testing money_format() : basic functionality using national currency symbols***\n; +// === +// = We do not test for exact return-values, as those might be different between OS-versions = +// === -$original = setlocale(LC_MONETARY, 'en_US'); +echo *** Testing money_format() : basic functionality***\n; $value = 1234.5678; $negative_value = -1234.5678; @@ -28,57 +26,55 @@ // left precision, 2 of right precision using national // format for en_US echo Format values with 14 positions, 8 digits to left, 2 to right using national format\n; -var_dump( money_format('%14#8.2n', $value)); -var_dump( money_format('%14#8.2n', $negative_value)); +echo gettype(money_format('%14#8.2n', $value)).\n; +echo gettype(money_format('%14#8.2n', $negative_value)).\n; // Same again but use '(' for negative values echo Format again but with ( for negative values\n; -var_dump( money_format('%(14#8.2n', $value)); -var_dump( money_format('%(14#8.2n', $negative_value)); +echo gettype(money_format('%(14#8.2n', $value)).\n; +echo gettype(money_format('%(14#8.2n', $negative_value)).\n; // Same again but use a '0' for padding character echo Format with 0 for padding character\n; -var_dump( money_format('%=014#8.2n', $value)); -var_dump( money_format('%=014#8.2n', $negative_value)); +echo gettype(money_format('%=014#8.2n', $value)).\n; +echo gettype(money_format('%=014#8.2n', $negative_value)).\n; // Same again but use a '*' for padding character echo Format again with * for padding character\n; -var_dump( money_format('%=*14#8.2n', $value)); -var_dump( money_format('%=*14#8.2n', $negative_value)); +echo gettype(money_format('%=*14#8.2n', $value)).\n; +echo gettype(money_format('%=*14#8.2n', $negative_value)).\n; // Same again but disable grouping character echo Format again but disable grouping character\n; -var_dump( money_format('%=*^14#8.2n', $value)); -var_dump( money_format('%=*^14#8.2n', $negative_value)); +echo gettype(money_format('%=*^14#8.2n', $value)).\n; +echo gettype(money_format('%=*^14#8.2n', $negative_value)).\n; // Same again but suppress currency symbol echo Format again suppress currency symbol\n; -var_dump( money_format('%=*!14#8.2n', $value)); -var_dump( money_format('%=*!14#8.2n', $negative_value)); +echo gettype(money_format('%=*!14#8.2n', $value)).\n; +echo gettype(money_format('%=*!14#8.2n', $negative_value)).\n; -setlocale(LC_MONETARY, $original); - ? ===DONE=== --EXPECT-- -*** Testing money_format() : basic functionality using national currency symbols*** +*** Testing money_format() : basic functionality*** Format values with 14 positions, 8 digits to left, 2 to right using national format -string(15) $ 1,234.57 -string(15) -$ 1,234.57 +string +string Format again but with ( for negative values -string(15) $ 1,234.57 -string(16) ($ 1,234.57) +string +string Format with 0 for padding character -string(15) $01,234.57 -string(15) -$01,234.57 +string +string Format again with * for padding character -string(15) $*1,234.57 -string(15) -$*1,234.57 +string +string
[PHP-CVS] svn: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/ money_format_basic1.phpt money_format_basic2.phpt money_format_basic3.phpt money_format_error.phpt money_format_variation1.phpt
indeyetsFri, 17 Jul 2009 16:04:06 + URL: http://svn.php.net/viewvc?view=revisionrevision=284274 Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic1.phpt D php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic2.phpt D php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic3.phpt U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_error.phpt U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_variation1.phpt U php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_variation2.phpt Log: MFB: fixed tests. money_format() is implemented in underlying system, not in php. So, we shouldn't test for actual values returned. They are different between systems Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic1.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 15:57:31 UTC (rev 284273) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 16:04:06 UTC (rev 284274) @@ -2,13 +2,9 @@ Test money_format() function : basic functionality using national currency symbols --SKIPIF-- ?php - if (!function_exists('money_format') || !function_exists('setlocale')) { + if (!function_exists('money_format')) { die(SKIP money_format - not supported\n); } - - if (setlocale(LC_MONETARY, 'en_US') == false) { - die(SKIP en_US locale not available\n); - } ? --FILE-- ?php @@ -17,9 +13,11 @@ * Source code: ext/standard/string.c */ -echo *** Testing money_format() : basic functionality using national currency symbols***\n; +// === +// = We do not test for exact return-values, as those might be different between OS-versions = +// === -$original = setlocale(LC_MONETARY, 'en_US'); +echo *** Testing money_format() : basic functionality***\n; $value = 1234.5678; $negative_value = -1234.5678; @@ -28,57 +26,55 @@ // left precision, 2 of right precision using national // format for en_US echo Format values with 14 positions, 8 digits to left, 2 to right using national format\n; -var_dump( money_format('%14#8.2n', $value)); -var_dump( money_format('%14#8.2n', $negative_value)); +echo gettype(money_format('%14#8.2n', $value)).\n; +echo gettype(money_format('%14#8.2n', $negative_value)).\n; // Same again but use '(' for negative values echo Format again but with ( for negative values\n; -var_dump( money_format('%(14#8.2n', $value)); -var_dump( money_format('%(14#8.2n', $negative_value)); +echo gettype(money_format('%(14#8.2n', $value)).\n; +echo gettype(money_format('%(14#8.2n', $negative_value)).\n; // Same again but use a '0' for padding character echo Format with 0 for padding character\n; -var_dump( money_format('%=014#8.2n', $value)); -var_dump( money_format('%=014#8.2n', $negative_value)); +echo gettype(money_format('%=014#8.2n', $value)).\n; +echo gettype(money_format('%=014#8.2n', $negative_value)).\n; // Same again but use a '*' for padding character echo Format again with * for padding character\n; -var_dump( money_format('%=*14#8.2n', $value)); -var_dump( money_format('%=*14#8.2n', $negative_value)); +echo gettype(money_format('%=*14#8.2n', $value)).\n; +echo gettype(money_format('%=*14#8.2n', $negative_value)).\n; // Same again but disable grouping character echo Format again but disable grouping character\n; -var_dump( money_format('%=*^14#8.2n', $value)); -var_dump( money_format('%=*^14#8.2n', $negative_value)); +echo gettype(money_format('%=*^14#8.2n', $value)).\n; +echo gettype(money_format('%=*^14#8.2n', $negative_value)).\n; // Same again but suppress currency symbol echo Format again suppress currency symbol\n; -var_dump( money_format('%=*!14#8.2n', $value)); -var_dump( money_format('%=*!14#8.2n', $negative_value)); +echo gettype(money_format('%=*!14#8.2n', $value)).\n; +echo gettype(money_format('%=*!14#8.2n', $negative_value)).\n; -setlocale(LC_MONETARY, $original); - ? ===DONE=== --EXPECT-- -*** Testing money_format() : basic functionality using national currency symbols*** +*** Testing money_format() : basic functionality*** Format values with 14 positions, 8 digits to left, 2 to right using national format -string(15) $ 1,234.57 -string(15) -$ 1,234.57 +string +string Format again but with ( for negative values -string(15) $ 1,234.57 -string(16) ($ 1,234.57) +string +string Format with 0 for padding character -string(15) $01,234.57 -string(15) -$01,234.57 +string +string Format again with * for padding character -string(15) $*1,234.57 -string(15) -$*1,234.57 +string
[PHP-CVS] svn: php/php-src/trunk/ext/standard/tests/strings/ money_format_basic1.phpt money_format_basic2.phpt money_format_basic3.phpt money_format_error.phpt money_format_variation1.phpt money_forma
indeyetsFri, 17 Jul 2009 16:21:00 + URL: http://svn.php.net/viewvc?view=revisionrevision=284275 Changed paths: U php/php-src/trunk/ext/standard/tests/strings/money_format_basic1.phpt D php/php-src/trunk/ext/standard/tests/strings/money_format_basic2.phpt D php/php-src/trunk/ext/standard/tests/strings/money_format_basic3.phpt U php/php-src/trunk/ext/standard/tests/strings/money_format_error.phpt U php/php-src/trunk/ext/standard/tests/strings/money_format_variation1.phpt U php/php-src/trunk/ext/standard/tests/strings/money_format_variation2.phpt Log: MFB: fixed tests. money_format() is implemented in underlying system, not in php. So, we shouldn't test for actual values returned. They are different between systems Modified: php/php-src/trunk/ext/standard/tests/strings/money_format_basic1.phpt === --- php/php-src/trunk/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 16:04:06 UTC (rev 284274) +++ php/php-src/trunk/ext/standard/tests/strings/money_format_basic1.phpt 2009-07-17 16:21:00 UTC (rev 284275) @@ -1,14 +1,10 @@ --TEST-- -Test money_format() function : basic functionality using national currency symbols +Test money_format() function : basic functionality --SKIPIF-- ?php - if (!function_exists('money_format') || !function_exists('setlocale')) { + if (!function_exists('money_format')) { die(SKIP money_format - not supported\n); } - - if (setlocale(LC_MONETARY, 'en_US') == false) { - die(SKIP en_US locale not available\n); - } ? --FILE-- ?php @@ -17,9 +13,11 @@ * Source code: ext/standard/string.c */ -echo *** Testing money_format() : basic functionality using national currency symbols***\n; +// === +// = We do not test for exact return-values, as those might be different between OS-versions = +// === -$original = setlocale(LC_MONETARY, 'en_US'); +echo *** Testing money_format() : basic functionality***\n; $value = 1234.5678; $negative_value = -1234.5678; @@ -28,60 +26,54 @@ // left precision, 2 of right precision using national // format for en_US echo Format values with 14 positions, 8 digits to left, 2 to right using national format\n; -var_dump( money_format('%14#8.2n', $value)); -var_dump( money_format('%14#8.2n', $negative_value)); +echo gettype(money_format('%14#8.2n', $value)).\n; +echo gettype(money_format('%14#8.2n', $negative_value)).\n; // Same again but use '(' for negative values echo Format again but with ( for negative values\n; -var_dump( money_format('%(14#8.2n', $value)); -var_dump( money_format('%(14#8.2n', $negative_value)); +echo gettype(money_format('%(14#8.2n', $value)).\n; +echo gettype(money_format('%(14#8.2n', $negative_value)).\n; // Same again but use a '0' for padding character echo Format with 0 for padding character\n; -var_dump( money_format('%=014#8.2n', $value)); -var_dump( money_format('%=014#8.2n', $negative_value)); +echo gettype(money_format('%=014#8.2n', $value)).\n; +echo gettype(money_format('%=014#8.2n', $negative_value)).\n; // Same again but use a '*' for padding character echo Format again with * for padding character\n; -var_dump( money_format('%=*14#8.2n', $value)); -var_dump( money_format('%=*14#8.2n', $negative_value)); +echo gettype(money_format('%=*14#8.2n', $value)).\n; +echo gettype(money_format('%=*14#8.2n', $negative_value)).\n; // Same again but disable grouping character echo Format again but disable grouping character\n; -var_dump( money_format('%=*^14#8.2n', $value)); -var_dump( money_format('%=*^14#8.2n', $negative_value)); +echo gettype(money_format('%=*^14#8.2n', $value)).\n; +echo gettype(money_format('%=*^14#8.2n', $negative_value)).\n; // Same again but suppress currency symbol echo Format again suppress currency symbol\n; -var_dump( money_format('%=*!14#8.2n', $value)); -var_dump( money_format('%=*!14#8.2n', $negative_value)); +echo gettype(money_format('%=*!14#8.2n', $value)).\n; +echo gettype(money_format('%=*!14#8.2n', $negative_value)).\n; -setlocale(LC_MONETARY, $original); - ? ===DONE=== --EXPECTF-- -*** Testing money_format() : basic functionality using national currency symbols*** - -Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d +*** Testing money_format() : basic functionality*** Format values with 14 positions, 8 digits to left, 2 to right using national format -unicode(15) $ 1,234.57 -unicode(15) -$ 1,234.57 +unicode +unicode Format again but with ( for negative values -unicode(15) $ 1,234.57 -unicode(16) ($ 1,234.57) +unicode +unicode Format with 0 for padding character -unicode(15) $01,234.57 -unicode(15) -$01,234.57 +unicode +unicode Format again with * for
[PHP-CVS] svn: php/php-src/ branches/PHP_5_3/ext/standard/tests/file/glob_error_002.phpt trunk/ext/standard/tests/file/glob_error_002.phpt
indeyetsFri, 17 Jul 2009 17:17:57 + URL: http://svn.php.net/viewvc?view=revisionrevision=284276 Changed paths: D php/php-src/branches/PHP_5_3/ext/standard/tests/file/glob_error_002.phpt D php/php-src/trunk/ext/standard/tests/file/glob_error_002.phpt Log: removing test. this one tests system-specific behavior, not something implemented in php Deleted: php/php-src/branches/PHP_5_3/ext/standard/tests/file/glob_error_002.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/file/glob_error_002.phpt 2009-07-17 16:21:00 UTC (rev 284275) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/glob_error_002.phpt 2009-07-17 17:17:57 UTC (rev 284276) @@ -1,27 +0,0 @@ ---TEST-- -Test glob() function: long pattern. ---CREDITS-- -Dave Kelsey d_kel...@uk.ibm.com ---SKIPIF-- -?php -if(substr(PHP_OS, 0, 3) == WIN) - die(skip Not valid for Windows); -? ---FILE-- -?php -/* Prototype: array glob ( string $pattern [, int $flags] ); - Description: Find pathnames matching a pattern -*/ - -echo *** Testing glob() : long pattern. ***\n; - -var_dump(glob(str_repeat('x', 3000))); - -echo Done; -? ---EXPECTF-- -*** Testing glob() : long pattern. *** -array(0) { -} -Done - Deleted: php/php-src/trunk/ext/standard/tests/file/glob_error_002.phpt === --- php/php-src/trunk/ext/standard/tests/file/glob_error_002.phpt 2009-07-17 16:21:00 UTC (rev 284275) +++ php/php-src/trunk/ext/standard/tests/file/glob_error_002.phpt 2009-07-17 17:17:57 UTC (rev 284276) @@ -1,27 +0,0 @@ ---TEST-- -Test glob() function: long pattern. ---CREDITS-- -Dave Kelsey d_kel...@uk.ibm.com ---SKIPIF-- -?php -if(substr(PHP_OS, 0, 3) == WIN) - die(skip Not valid for Windows); -? ---FILE-- -?php -/* Prototype: array glob ( string $pattern [, int $flags] ); - Description: Find pathnames matching a pattern -*/ - -echo *** Testing glob() : long pattern. ***\n; - -var_dump(glob(str_repeat('x', 3000))); - -echo Done; -? ---EXPECTF-- -*** Testing glob() : long pattern. *** -array(0) { -} -Done - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/php-src/trunk/ext/standard/tests/misc/
indeyetsWed, 15 Jul 2009 10:05:59 + URL: http://svn.php.net/viewvc?view=revisionrevision=284108 Changed paths: U php/php-src/trunk/ext/standard/tests/misc/time_nanosleep_error4.phpt Log: fix broken test Modified: php/php-src/trunk/ext/standard/tests/misc/time_nanosleep_error4.phpt === --- php/php-src/trunk/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 09:25:28 UTC (rev 284107) +++ php/php-src/trunk/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 10:05:59 UTC (rev 284108) @@ -1,8 +1,8 @@ ---TEST-- +--TEST-- time_nanosleep — Delay for a number of seconds and nanoseconds --SKIPIF-- ?php -if (strpos(strtoupper(PHP_OS), 'WIN') !== false) die(skip Test is not valid for Windows); +if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') die(skip Test is not valid for Windows); if (!function_exists('time_nanosleep')) die(skip); ? --CREDITS-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/php-src/branches/PHP_5_3/ext/standard/tests/misc/
indeyetsWed, 15 Jul 2009 10:06:38 + URL: http://svn.php.net/viewvc?view=revisionrevision=284109 Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/tests/misc/time_nanosleep_error4.phpt Log: MFH: fix broken test Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/misc/time_nanosleep_error4.phpt === --- php/php-src/branches/PHP_5_3/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 10:05:59 UTC (rev 284108) +++ php/php-src/branches/PHP_5_3/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 10:06:38 UTC (rev 284109) @@ -1,8 +1,8 @@ ---TEST-- +--TEST-- time_nanosleep — Delay for a number of seconds and nanoseconds --SKIPIF-- ?php -if (strpos(strtoupper(PHP_OS), 'WIN') !== false) die(skip Test is not valid for Windows); +if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') die(skip Test is not valid for Windows); if (!function_exists('time_nanosleep')) die(skip); ? --CREDITS-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/php-src/branches/PHP_5_2/ext/standard/tests/misc/
indeyetsWed, 15 Jul 2009 10:17:04 + URL: http://svn.php.net/viewvc?view=revisionrevision=284110 Changed paths: U php/php-src/branches/PHP_5_2/ext/standard/tests/misc/time_nanosleep_error4.phpt Log: MFH: fix broken test Modified: php/php-src/branches/PHP_5_2/ext/standard/tests/misc/time_nanosleep_error4.phpt === --- php/php-src/branches/PHP_5_2/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 10:06:38 UTC (rev 284109) +++ php/php-src/branches/PHP_5_2/ext/standard/tests/misc/time_nanosleep_error4.phpt 2009-07-15 10:17:04 UTC (rev 284110) @@ -2,7 +2,7 @@ time_nanosleep — Delay for a number of seconds and nanoseconds --SKIPIF-- ?php -if (substr(strtoupper(PHP_OS, 'WIN'))) die(skip Test is not valid for Windows); +if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') die(skip Test is not valid for Windows); if (!function_exists('time_nanosleep')) die(skip); ? --CREDITS-- -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/php-src/trunk/ext/standard/tests/array/
indeyetsWed, 15 Jul 2009 14:08:18 + URL: http://svn.php.net/viewvc?view=revisionrevision=284122 Changed paths: UU php/php-src/trunk/ext/standard/tests/array/array_intersect_assoc_variation4.phpt UU php/php-src/trunk/ext/standard/tests/array/array_intersect_variation3.phpt UU php/php-src/trunk/ext/standard/tests/array/array_unique_variation2.phpt UU php/php-src/trunk/ext/standard/tests/array/asort_variation5.phpt UU php/php-src/trunk/ext/standard/tests/array/krsort_variation5.phpt UU php/php-src/trunk/ext/standard/tests/file/bug39538.phpt UU php/php-src/trunk/ext/standard/tests/file/fgetss_variation2.phpt UU php/php-src/trunk/ext/standard/tests/general_functions/debug_zval_dump_b.phpt UU php/php-src/trunk/ext/standard/tests/general_functions/print_r.phpt UU php/php-src/trunk/ext/standard/tests/general_functions/var_dump.phpt UU php/php-src/trunk/ext/standard/tests/strings/addcslashes_001.phpt UU php/php-src/trunk/ext/standard/tests/strings/chop_basic.phpt UU php/php-src/trunk/ext/standard/tests/strings/chunk_split_variation7.phpt UU php/php-src/trunk/ext/standard/tests/strings/chunk_split_variation9.phpt UU php/php-src/trunk/ext/standard/tests/strings/htmlspecialchars_decode_variation3.phpt UU php/php-src/trunk/ext/standard/tests/strings/htmlspecialchars_decode_variation5.phpt UU php/php-src/trunk/ext/standard/tests/strings/nl2br.phpt UU php/php-src/trunk/ext/standard/tests/strings/nl2br_variation1.phpt UU php/php-src/trunk/ext/standard/tests/strings/nl2br_variation3.phpt UU php/php-src/trunk/ext/standard/tests/strings/nl2br_variation4.phpt UU php/php-src/trunk/ext/standard/tests/strings/str_split_variation3.phpt UU php/php-src/trunk/ext/standard/tests/strings/str_split_variation5.phpt UU php/php-src/trunk/ext/standard/tests/strings/strip_tags_variation5.phpt UU php/php-src/trunk/ext/standard/tests/strings/strip_tags_variation9.phpt UU php/php-src/trunk/ext/standard/tests/strings/strlen.phpt UU php/php-src/trunk/ext/standard/tests/strings/strrchr_variation5.phpt UU php/php-src/trunk/ext/standard/tests/strings/strrev_variation1.phpt UU php/php-src/trunk/ext/standard/tests/strings/strtr_variation3.phpt UU php/php-src/trunk/ext/standard/tests/strings/ucwords_basic.phpt UU php/php-src/trunk/ext/standard/tests/strings/ucwords_variation2.phpt UU php/php-src/trunk/ext/standard/tests/strings/ucwords_variation4.phpt Log: fix tests corrupted by svn's eol-style=native Modified: php/php-src/trunk/ext/standard/tests/array/array_intersect_assoc_variation4.phpt === --- php/php-src/trunk/ext/standard/tests/array/array_intersect_assoc_variation4.phpt 2009-07-15 13:55:39 UTC (rev 284121) +++ php/php-src/trunk/ext/standard/tests/array/array_intersect_assoc_variation4.phpt 2009-07-15 14:08:18 UTC (rev 284122) @@ -156,7 +156,7 @@ -- Iteration 8 -- array(1) { [uh3]= - unicode(88) hello + unicode(88) hello world != heredoc @@ -164,7 +164,7 @@ } array(1) { [uh3]= - unicode(88) hello + unicode(88) hello world != heredoc Property changes on: php/php-src/trunk/ext/standard/tests/array/array_intersect_assoc_variation4.phpt ___ Deleted: svn:eol-style - native Modified: php/php-src/trunk/ext/standard/tests/array/array_intersect_variation3.phpt === --- php/php-src/trunk/ext/standard/tests/array/array_intersect_variation3.phpt 2009-07-15 13:55:39 UTC (rev 284121) +++ php/php-src/trunk/ext/standard/tests/array/array_intersect_variation3.phpt 2009-07-15 14:08:18 UTC (rev 284122) @@ -154,12 +154,12 @@ -- Iterator 6 -- array(1) { [1]= - unicode(5) + unicode(5) } array(1) { [1]= - unicode(5) + unicode(5) } -- Iterator 7 -- @@ -174,7 +174,7 @@ -- Iterator 8 -- array(2) { [2]= - unicode(88) hello + unicode(88) hello world != heredoc @@ -188,7 +188,7 @@ } array(2) { [2]= - unicode(88) hello + unicode(88) hello world != heredoc Property changes on: php/php-src/trunk/ext/standard/tests/array/array_intersect_variation3.phpt ___ Deleted: svn:eol-style - native Modified: php/php-src/trunk/ext/standard/tests/array/array_unique_variation2.phpt === --- php/php-src/trunk/ext/standard/tests/array/array_unique_variation2.phpt 2009-07-15 13:55:39 UTC (rev 284121) +++ php/php-src/trunk/ext/standard/tests/array/array_unique_variation2.phpt 2009-07-15 14:08:18 UTC (rev 284122) @@ -116,7 +116,7 @@
[PHP-CVS] cvs: php-src /ext/pdo_sqlite sqlite_statement.c
indeyetsWed Apr 1 11:31:54 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: const pointer was used in non-const context http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 Tue Mar 10 23:39:31 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 11:31:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.29 2009/03/10 23:39:31 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,6 +282,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; + const char *_str; + size_t _str_len; char *str; zval *flags; @@ -318,14 +320,20 @@ break; } - str = (char*)sqlite3_column_decltype(S-stmt, colno); - if (str) { + _str = sqlite3_column_decltype(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, sqlite:decl_type, str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - str = sqlite3_column_table_name(S-stmt, colno); - if (str) { + _str = sqlite3_column_table_name(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, table, str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pdo_sqlite sqlite_statement.c
indeyetsWed Apr 1 14:34:21 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: reverted previous patch, using explicit cast instead http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.30r2=1.31diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 php-src/ext/pdo_sqlite/sqlite_statement.c:1.31 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 Wed Apr 1 11:31:54 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 14:34:21 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ +/* $Id: sqlite_statement.c,v 1.31 2009/04/01 14:34:21 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,9 +282,7 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; - const char *_str; - size_t _str_len; - char *str; + const char *str; zval *flags; if (!S-stmt) { @@ -320,21 +318,15 @@ break; } - _str = sqlite3_column_decltype(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, sqlite:decl_type, str, 1); + str = sqlite3_column_decltype(S-stmt, colno); + if (str) { + add_assoc_string(return_value, sqlite:decl_type, (char *)str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - _str = sqlite3_column_table_name(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, table, str, 1); + str = sqlite3_column_table_name(S-stmt, colno); + if (str) { + add_assoc_string(return_value, table, (char *)str, 1); } #endif -- 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_sqlite sqlite_statement.c
indeyetsWed Apr 1 14:35:24 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pdo_sqlite sqlite_statement.c Log: MFH: reverted previous patch, using explicit cast instead http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.18.2.4.2.3.2.5r2=1.18.2.4.2.3.2.6diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.5 php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.6 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.18.2.4.2.3.2.5 Wed Apr 1 11:32:14 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 14:35:24 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.5 2009/04/01 11:32:14 indeyets Exp $ */ +/* $Id: sqlite_statement.c,v 1.18.2.4.2.3.2.6 2009/04/01 14:35:24 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,9 +282,7 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; - const char *_str; - size_t _str_len; - char *str; + const char *str; zval *flags; if (!S-stmt) { @@ -320,21 +318,15 @@ break; } - _str = sqlite3_column_decltype(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, sqlite:decl_type, str, 1); + str = sqlite3_column_decltype(S-stmt, colno); + if (str) { + add_assoc_string(return_value, sqlite:decl_type, (char *)str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - _str = sqlite3_column_table_name(S-stmt, colno); - _str_len = strlen(_str); - if (_str) { - str = emalloc(_str_len); - strcpy(str, _str); - add_assoc_string(return_value, table, str, 1); + str = sqlite3_column_table_name(S-stmt, colno); + if (str) { + add_assoc_string(return_value, table, (char *)str, 1); } #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: cvs: php-src /ext/pdo_sqlite sqlite_statement.c
2009/4/1 Scott MacVicar scott...@php.net: It's valid to discard the const qualifier, add_assoc_string runs estrndup to take a copy of the return value anyway. You've also made the code less readable and introduced a memory leak for str. So unless I've missed something can you revert this please. done. Used explicit cast to (char *) instead. Scott Alexey Zakhlestin wrote: indeyets Wed Apr 1 11:31:54 2009 UTC Modified files: /php-src/ext/pdo_sqlite sqlite_statement.c Log: const pointer was used in non-const context http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.29r2=1.30diff_format=u Index: php-src/ext/pdo_sqlite/sqlite_statement.c diff -u php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 php-src/ext/pdo_sqlite/sqlite_statement.c:1.30 --- php-src/ext/pdo_sqlite/sqlite_statement.c:1.29 Tue Mar 10 23:39:31 2009 +++ php-src/ext/pdo_sqlite/sqlite_statement.c Wed Apr 1 11:31:54 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: sqlite_statement.c,v 1.29 2009/03/10 23:39:31 helly Exp $ */ +/* $Id: sqlite_statement.c,v 1.30 2009/04/01 11:31:54 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -282,6 +282,8 @@ static int pdo_sqlite_stmt_col_meta(pdo_stmt_t *stmt, long colno, zval *return_value TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt-driver_data; + const char *_str; + size_t _str_len; char *str; zval *flags; @@ -318,14 +320,20 @@ break; } - str = (char*)sqlite3_column_decltype(S-stmt, colno); - if (str) { + _str = sqlite3_column_decltype(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, sqlite:decl_type, str, 1); } #ifdef SQLITE_ENABLE_COLUMN_METADATA - str = sqlite3_column_table_name(S-stmt, colno); - if (str) { + _str = sqlite3_column_table_name(S-stmt, colno); + _str_len = strlen(_str); + if (_str) { + str = emalloc(_str_len); + strcpy(str, _str); add_assoc_string(return_value, table, str, 1); } #endif -- Alexey Zakhlestin http://www.milkfarmsoft.com/ -- 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) /sapi/apache_hooks php_apache.c
indeyetsTue Nov 18 19:07:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/apache_hooks php_apache.c Log: new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.19.2.3.2.5.2.7r2=1.19.2.3.2.5.2.8diff_format=u Index: php-src/sapi/apache_hooks/php_apache.c diff -u php-src/sapi/apache_hooks/php_apache.c:1.19.2.3.2.5.2.7 php-src/sapi/apache_hooks/php_apache.c:1.19.2.3.2.5.2.8 --- php-src/sapi/apache_hooks/php_apache.c:1.19.2.3.2.5.2.7 Mon Nov 17 11:28:01 2008 +++ php-src/sapi/apache_hooks/php_apache.c Tue Nov 18 19:07:47 2008 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.19.2.3.2.5.2.7 2008/11/17 11:28:01 felipe Exp $ */ +/* $Id: php_apache.c,v 1.19.2.3.2.5.2.8 2008/11/18 19:07:47 indeyets Exp $ */ #include php_apache_http.h @@ -220,11 +220,16 @@ */ static void apache_request_string_slot(int offset, INTERNAL_FUNCTION_PARAMETERS) { - zval *id, **new_value; + zval *id; request_rec *r; - char *old_value; + char *old_value, *new_value; + int new_value_len; char **target; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, new_value, new_value_len) == FAILURE) { + return; + } + APREQ_GET_REQUEST(id, r); target = (char **)((char*)r + offset); @@ -234,11 +239,7 @@ case 0: break; case 1: - if (zend_get_parameters_ex(1, new_value) == FAILURE) { - RETURN_FALSE; - } - convert_to_string_ex(new_value); - *target = ap_pstrdup(r-pool, Z_STRVAL_PP(new_value)); + *target = ap_pstrdup(r-pool, new_value); break; default: WRONG_PARAM_COUNT; @@ -276,11 +277,15 @@ */ static void apache_request_int_slot(int offset, INTERNAL_FUNCTION_PARAMETERS) { - zval *id, **new_value; + zval *id; request_rec *r; - long old_value; + long old_value, new_value; long *target; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, new_value) == FAILURE) { + return; + } + APREQ_GET_REQUEST(id, r); target = (long *)((char*)r + offset); @@ -290,11 +295,7 @@ case 0: break; case 1: - if (zend_get_parameters_ex(1, new_value) == FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(new_value); - *target = Z_LVAL_PP(new_value); + *target = new_value; break; default: WRONG_PARAM_COUNT; @@ -521,24 +522,20 @@ */ PHP_FUNCTION(apache_request_content_length) { - zval *id, **zlen; + zval *id; + long zlen; request_rec *r; - if (ZEND_NUM_ARGS() == 0) { - apache_request_read_int_slot(offsetof(request_rec, clength), INTERNAL_FUNCTION_PARAM_PASSTHRU); - } - else if (ZEND_NUM_ARGS() 1) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, zlen) == FAILURE) { + return; } - else { - if (zend_get_parameters_ex(1, zlen) == FAILURE) { - RETURN_FALSE; - } + if (ZEND_NUM_ARGS() == 0) { + apache_request_read_int_slot(offsetof(request_rec, clength), INTERNAL_FUNCTION_PARAM_PASSTHRU); + } else { APREQ_GET_REQUEST(id, r); - convert_to_long_ex(zlen); - (void)ap_set_content_length(r, Z_LVAL_PP(zlen)); + (void)ap_set_content_length(r, zlen); RETURN_TRUE; } } @@ -733,23 +730,21 @@ */ PHP_FUNCTION(apache_request_remote_host) { - zval *id, **ztype; + zval *id; + long ztype; request_rec *r; char *res; int type = REMOTE_NAME; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, ztype) == FAILURE) { + return; + } + switch (ZEND_NUM_ARGS()) { case 0: break; case 1: - if (zend_get_parameters_ex(1, ztype) == FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(ztype); - type = Z_LVAL_PP(ztype); - break; - default: - WRONG_PARAM_COUNT; + type = ztype; break;
[PHP-CVS] cvs: php-src /sapi/apache_hooks php_apache.c
indeyetsTue Nov 18 19:09:15 2008 UTC Modified files: /php-src/sapi/apache_hooks php_apache.c Log: MFB: new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.36r2=1.37diff_format=u Index: php-src/sapi/apache_hooks/php_apache.c diff -u php-src/sapi/apache_hooks/php_apache.c:1.36 php-src/sapi/apache_hooks/php_apache.c:1.37 --- php-src/sapi/apache_hooks/php_apache.c:1.36 Mon Nov 17 11:26:25 2008 +++ php-src/sapi/apache_hooks/php_apache.c Tue Nov 18 19:09:15 2008 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.36 2008/11/17 11:26:25 felipe Exp $ */ +/* $Id: php_apache.c,v 1.37 2008/11/18 19:09:15 indeyets Exp $ */ #include php_apache_http.h @@ -220,11 +220,16 @@ */ static void apache_request_string_slot(int offset, INTERNAL_FUNCTION_PARAMETERS) { - zval *id, **new_value; + zval *id; request_rec *r; - char *old_value; + char *old_value, *new_value; + int new_value_len; char **target; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, new_value, new_value_len) == FAILURE) { + return; + } + APREQ_GET_REQUEST(id, r); target = (char **)((char*)r + offset); @@ -234,11 +239,7 @@ case 0: break; case 1: - if (zend_get_parameters_ex(1, new_value) == FAILURE) { - RETURN_FALSE; - } - convert_to_string_ex(new_value); - *target = ap_pstrdup(r-pool, Z_STRVAL_PP(new_value)); + *target = ap_pstrdup(r-pool, new_value); break; default: WRONG_PARAM_COUNT; @@ -276,11 +277,15 @@ */ static void apache_request_int_slot(int offset, INTERNAL_FUNCTION_PARAMETERS) { - zval *id, **new_value; + zval *id; request_rec *r; - long old_value; + long old_value, new_value; long *target; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, new_value) == FAILURE) { + return; + } + APREQ_GET_REQUEST(id, r); target = (long *)((char*)r + offset); @@ -290,11 +295,7 @@ case 0: break; case 1: - if (zend_get_parameters_ex(1, new_value) == FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(new_value); - *target = Z_LVAL_PP(new_value); + *target = new_value; break; default: WRONG_PARAM_COUNT; @@ -521,24 +522,20 @@ */ PHP_FUNCTION(apache_request_content_length) { - zval *id, **zlen; + zval *id; + long zlen; request_rec *r; - if (ZEND_NUM_ARGS() == 0) { - apache_request_read_int_slot(offsetof(request_rec, clength), INTERNAL_FUNCTION_PARAM_PASSTHRU); - } - else if (ZEND_NUM_ARGS() 1) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, zlen) == FAILURE) { + return; } - else { - if (zend_get_parameters_ex(1, zlen) == FAILURE) { - RETURN_FALSE; - } + if (ZEND_NUM_ARGS() == 0) { + apache_request_read_int_slot(offsetof(request_rec, clength), INTERNAL_FUNCTION_PARAM_PASSTHRU); + } else { APREQ_GET_REQUEST(id, r); - convert_to_long_ex(zlen); - (void)ap_set_content_length(r, Z_LVAL_PP(zlen)); + (void)ap_set_content_length(r, zlen); RETURN_TRUE; } } @@ -733,23 +730,21 @@ */ PHP_FUNCTION(apache_request_remote_host) { - zval *id, **ztype; + zval *id; + long ztype; request_rec *r; char *res; int type = REMOTE_NAME; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, ztype) == FAILURE) { + return; + } + switch (ZEND_NUM_ARGS()) { case 0: break; case 1: - if (zend_get_parameters_ex(1, ztype) == FAILURE) { - RETURN_FALSE; - } - convert_to_long_ex(ztype); - type = Z_LVAL_PP(ztype); - break; - default: - WRONG_PARAM_COUNT; + type = ztype; break; } @@ -757,6 +752,7 @@ APREQ_GET_REQUEST(id, r); res = (char
[PHP-CVS] cvs: php-src(PHP_5_3) /main main.c
indeyetsFri Nov 7 09:12:39 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main main.c Log: added const, as required by struct-definition http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.34r2=1.640.2.23.2.57.2.35diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.23.2.57.2.34 php-src/main/main.c:1.640.2.23.2.57.2.35 --- php-src/main/main.c:1.640.2.23.2.57.2.34Wed Sep 17 00:20:29 2008 +++ php-src/main/main.c Fri Nov 7 09:12:39 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.23.2.57.2.34 2008/09/17 00:20:29 iliaa Exp $ */ +/* $Id: main.c,v 1.640.2.23.2.57.2.35 2008/11/07 09:12:39 indeyets Exp $ */ /* {{{ includes */ @@ -1122,7 +1122,7 @@ /* {{{ php_get_configuration_directive_for_zend */ -static int php_get_configuration_directive_for_zend(char *name, uint name_length, zval *contents) +static int php_get_configuration_directive_for_zend(const char *name, uint name_length, zval *contents) { zval *retval = cfg_get_entry(name, name_length); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dba dba.c
indeyetsFri Nov 7 12:50:59 2008 UTC Modified files: /php-src/ext/dbadba.c Log: MFB: new parameter-parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/dba/dba.c?r1=1.128r2=1.129diff_format=u Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.128 php-src/ext/dba/dba.c:1.129 --- php-src/ext/dba/dba.c:1.128 Sun Nov 2 21:10:07 2008 +++ php-src/ext/dba/dba.c Fri Nov 7 12:50:59 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.128 2008/11/02 21:10:07 felipe Exp $ */ +/* $Id: dba.c,v 1.129 2008/11/07 12:50:59 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -207,33 +207,28 @@ /* {{{ macromania */ #define DBA_ID_PARS \ - zval **id; \ + zval *id; \ dba_info *info = NULL; \ int ac = ZEND_NUM_ARGS() /* these are used to get the standard arguments */ -#define DBA_GET1 \ - if(ac != 1 || zend_get_parameters_ex(ac, id) != SUCCESS) { \ - WRONG_PARAM_COUNT; \ - } - /* {{{ php_dba_myke_key */ -static size_t php_dba_make_key(zval **key, char **key_str, char **key_free TSRMLS_DC) +static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS_DC) { - if (Z_TYPE_PP(key) == IS_ARRAY) { + if (Z_TYPE_P(key) == IS_ARRAY) { zval **group, **name; HashPosition pos; size_t len; - if (zend_hash_num_elements(Z_ARRVAL_PP(key)) != 2) { + if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) { php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, Key does not have exactly two elements: (key, name)); return -1; } - zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(key), pos); - zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) group, pos); - zend_hash_move_forward_ex(Z_ARRVAL_PP(key), pos); - zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) name, pos); + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), pos); + zend_hash_get_current_data_ex(Z_ARRVAL_P(key), (void **) group, pos); + zend_hash_move_forward_ex(Z_ARRVAL_P(key), pos); + zend_hash_get_current_data_ex(Z_ARRVAL_P(key), (void **) name, pos); convert_to_string_ex(group); convert_to_string_ex(name); if (Z_STRLEN_PP(group) == 0) { @@ -245,43 +240,42 @@ *key_free = *key_str; return len; } else { - convert_to_string_ex(key); - *key_str = Z_STRVAL_PP(key); *key_free = NULL; - return Z_STRLEN_PP(key); + + convert_to_string(key); + *key_str = Z_STRVAL_P(key); + + return Z_STRLEN_P(key); } } /* }}} */ #define DBA_GET2 \ - zval **key; \ + zval *key; \ char *key_str, *key_free; \ size_t key_len; \ - if(ac != 2 || zend_get_parameters_ex(ac, key, id) != SUCCESS) { \ - WRONG_PARAM_COUNT; \ + if (zend_parse_parameters(ac TSRMLS_CC, zr, key, id) == FAILURE) { \ + return; \ } \ if ((key_len = php_dba_make_key(key, key_str, key_free TSRMLS_CC)) == 0) {\ RETURN_FALSE; \ } #define DBA_GET2_3 \ - zval **key;
[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/apache2filter php_functions.c
indeyetsFri Nov 7 13:28:23 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/apache2filter php_functions.c Log: new parameter-parsing API http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/php_functions.c?r1=1.44.2.2.2.2.2.5r2=1.44.2.2.2.2.2.6diff_format=u Index: php-src/sapi/apache2filter/php_functions.c diff -u php-src/sapi/apache2filter/php_functions.c:1.44.2.2.2.2.2.5 php-src/sapi/apache2filter/php_functions.c:1.44.2.2.2.2.2.6 --- php-src/sapi/apache2filter/php_functions.c:1.44.2.2.2.2.2.5 Sun Nov 2 21:19:39 2008 +++ php-src/sapi/apache2filter/php_functions.c Fri Nov 7 13:28:23 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.44.2.2.2.2.2.5 2008/11/02 21:19:39 felipe Exp $ */ +/* $Id: php_functions.c,v 1.44.2.2.2.2.2.6 2008/11/07 13:28:23 indeyets Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -59,23 +59,22 @@ Perform an apache sub-request */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + int filename_len; request_rec *rr; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } if (rr-status == HTTP_OK) { if (ap_run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -83,7 +82,7 @@ RETURN_TRUE; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -99,16 +98,15 @@ PHP_FUNCTION(apache_lookup_uri) { request_rec *rr; - zval **filename; + char *filename; + int filename_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } @@ -145,7 +143,7 @@ return; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -195,31 +193,28 @@ PHP_FUNCTION(apache_note) { php_struct *ctx; - zval **note_name, **note_val; + char *note_name, *note_val; + int note_name_len, note_val_len; char *old_note_val=NULL; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, note_name, note_val) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - + ctx = SG(server_context); - - convert_to_string_ex(note_name); - old_note_val = (char *) apr_table_get(ctx-r-notes, Z_STRVAL_PP(note_name)); - + old_note_val = (char *) apr_table_get(ctx-r-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(note_val); - apr_table_set(ctx-r-notes, Z_STRVAL_PP(note_name), Z_STRVAL_PP(note_val)); +
[PHP-CVS] cvs: php-src /sapi/apache2filter php_functions.c
indeyetsFri Nov 7 13:28:56 2008 UTC Modified files: /php-src/sapi/apache2filter php_functions.c Log: MFB: new parameter-parsing API http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/php_functions.c?r1=1.54r2=1.55diff_format=u Index: php-src/sapi/apache2filter/php_functions.c diff -u php-src/sapi/apache2filter/php_functions.c:1.54 php-src/sapi/apache2filter/php_functions.c:1.55 --- php-src/sapi/apache2filter/php_functions.c:1.54 Sun Nov 2 21:10:12 2008 +++ php-src/sapi/apache2filter/php_functions.c Fri Nov 7 13:28:56 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.54 2008/11/02 21:10:12 felipe Exp $ */ +/* $Id: php_functions.c,v 1.55 2008/11/07 13:28:56 indeyets Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -59,23 +59,22 @@ Perform an apache sub-request */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + int filename_len; request_rec *rr; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } if (rr-status == HTTP_OK) { if (ap_run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -83,7 +82,7 @@ RETURN_TRUE; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -99,16 +98,15 @@ PHP_FUNCTION(apache_lookup_uri) { request_rec *rr; - zval **filename; + char *filename; + int filename_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } @@ -145,7 +143,7 @@ return; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -195,31 +193,28 @@ PHP_FUNCTION(apache_note) { php_struct *ctx; - zval **note_name, **note_val; + char *note_name, *note_val; + int note_name_len, note_val_len; char *old_note_val=NULL; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, note_name, note_val) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - + ctx = SG(server_context); - - convert_to_string_ex(note_name); - old_note_val = (char *) apr_table_get(ctx-r-notes, Z_STRVAL_PP(note_name)); - + old_note_val = (char *) apr_table_get(ctx-r-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(note_val); - apr_table_set(ctx-r-notes, Z_STRVAL_PP(note_name), Z_STRVAL_PP(note_val)); + apr_table_set(ctx-r-notes, note_name, note_val); } if (old_note_val) {
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dba dba.c
indeyetsFri Nov 7 12:39:11 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/dbadba.c Log: new parameter-parsing API http://cvs.php.net/viewvc.cgi/php-src/ext/dba/dba.c?r1=1.111.2.4.2.5.2.6r2=1.111.2.4.2.5.2.7diff_format=u Index: php-src/ext/dba/dba.c diff -u php-src/ext/dba/dba.c:1.111.2.4.2.5.2.6 php-src/ext/dba/dba.c:1.111.2.4.2.5.2.7 --- php-src/ext/dba/dba.c:1.111.2.4.2.5.2.6 Sun Nov 2 21:19:31 2008 +++ php-src/ext/dba/dba.c Fri Nov 7 12:39:11 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dba.c,v 1.111.2.4.2.5.2.6 2008/11/02 21:19:31 felipe Exp $ */ +/* $Id: dba.c,v 1.111.2.4.2.5.2.7 2008/11/07 12:39:11 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -207,33 +207,28 @@ /* {{{ macromania */ #define DBA_ID_PARS \ - zval **id; \ + zval *id; \ dba_info *info = NULL; \ int ac = ZEND_NUM_ARGS() /* these are used to get the standard arguments */ -#define DBA_GET1 \ - if(ac != 1 || zend_get_parameters_ex(ac, id) != SUCCESS) { \ - WRONG_PARAM_COUNT; \ - } - /* {{{ php_dba_myke_key */ -static size_t php_dba_make_key(zval **key, char **key_str, char **key_free TSRMLS_DC) +static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS_DC) { - if (Z_TYPE_PP(key) == IS_ARRAY) { + if (Z_TYPE_P(key) == IS_ARRAY) { zval **group, **name; HashPosition pos; size_t len; - if (zend_hash_num_elements(Z_ARRVAL_PP(key)) != 2) { + if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) { php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, Key does not have exactly two elements: (key, name)); return -1; } - zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(key), pos); - zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) group, pos); - zend_hash_move_forward_ex(Z_ARRVAL_PP(key), pos); - zend_hash_get_current_data_ex(Z_ARRVAL_PP(key), (void **) name, pos); + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), pos); + zend_hash_get_current_data_ex(Z_ARRVAL_P(key), (void **) group, pos); + zend_hash_move_forward_ex(Z_ARRVAL_P(key), pos); + zend_hash_get_current_data_ex(Z_ARRVAL_P(key), (void **) name, pos); convert_to_string_ex(group); convert_to_string_ex(name); if (Z_STRLEN_PP(group) == 0) { @@ -245,43 +240,42 @@ *key_free = *key_str; return len; } else { - convert_to_string_ex(key); - *key_str = Z_STRVAL_PP(key); *key_free = NULL; - return Z_STRLEN_PP(key); + + convert_to_string(key); + *key_str = Z_STRVAL_P(key); + + return Z_STRLEN_P(key); } } /* }}} */ #define DBA_GET2 \ - zval **key; \ + zval *key; \ char *key_str, *key_free; \ size_t key_len; \ - if(ac != 2 || zend_get_parameters_ex(ac, key, id) != SUCCESS) { \ - WRONG_PARAM_COUNT; \ + if (zend_parse_parameters(ac TSRMLS_CC, zr, key, id) == FAILURE) { \ + return; \ } \ if ((key_len = php_dba_make_key(key, key_str, key_free TSRMLS_CC)) == 0) {\ RETURN_FALSE; \ } #define DBA_GET2_3
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar/tests phar_oo_005.phpt
indeyetsTue Oct 21 12:26:36 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_oo_005.phpt Log: fixed wrong check for version http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_005.phpt?r1=1.9.2.2r2=1.9.2.3diff_format=u Index: php-src/ext/phar/tests/phar_oo_005.phpt diff -u php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.2 php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.3 --- php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.2 Fri Aug 1 13:38:47 2008 +++ php-src/ext/phar/tests/phar_oo_005.phpt Tue Oct 21 12:26:35 2008 @@ -4,7 +4,7 @@ ?php if (!extension_loaded(phar)) die(skip); if (!extension_loaded(spl)) die(skip SPL not available); -if (!version_compare(PHP_VERSION, 5.3, ==)) die(skip requires 5.3); +if (!version_compare(PHP_VERSION, 5.3, =)) die(skip requires 5.3); ? --INI-- phar.require_hash=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/standard/tests/file copy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
indeyetsTue Oct 21 12:45:35 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filecopy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt Log: these tests work just fine on macos-x http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.1.2.5.2.1r2=1.1.2.5.2.2diff_format=u Index: php-src/ext/standard/tests/file/copy_variation15.phpt diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.5.2.1 php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.5.2.2 --- php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.5.2.1 Mon Nov 5 17:43:20 2007 +++ php-src/ext/standard/tests/file/copy_variation15.phpt Tue Oct 21 12:45:35 2008 @@ -2,8 +2,8 @@ Test copy() function: usage variations - destination dir access perms --SKIPIF-- ?php -if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); // Skip if being run by root (files are always readable, writeable and executable) $filename = dirname(__FILE__)./copy_variation15_root_check.tmp; $fp = fopen($filename, 'w'); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.1.2.5.2.1r2=1.1.2.5.2.2diff_format=u Index: php-src/ext/standard/tests/file/copy_variation9.phpt diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.5.2.1 php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.5.2.2 --- php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.5.2.1Mon Nov 5 17:43:20 2007 +++ php-src/ext/standard/tests/file/copy_variation9.phptTue Oct 21 12:45:35 2008 @@ -2,8 +2,8 @@ Test copy() function: usage variations - destination file access perms --SKIPIF-- ?php -if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); // Skip if being run by root (files are always readable, writeable and executable) $filename = dirname(__FILE__)./copy_variation9_root_check.tmp; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2 php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.1 --- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2 Wed Aug 29 10:11:40 2007 +++ php-src/ext/standard/tests/file/fnmatch_basic.phpt Tue Oct 21 12:45:35 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Basic functionality --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_error.phpt diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.1 Mon Nov 5 17:43:20 2007 +++ php-src/ext/standard/tests/file/fnmatch_error.phpt Tue Oct 21 12:45:35 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Error conditions --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.1 Mon Nov 5 17:43:20 2007 +++ php-src/ext/standard/tests/file/fnmatch_variation.phpt Tue Oct 21 12:45:35 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Variations --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file copy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
indeyetsTue Oct 21 12:48:37 2008 UTC Modified files: /php-src/ext/standard/tests/filecopy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt Log: MFB: these tests work just fine on macos-x http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/ext/standard/tests/file/copy_variation15.phpt diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.7 php-src/ext/standard/tests/file/copy_variation15.phpt:1.8 --- php-src/ext/standard/tests/file/copy_variation15.phpt:1.7 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/copy_variation15.phpt Tue Oct 21 12:48:37 2008 @@ -2,8 +2,8 @@ Test copy() function: usage variations - destination dir access perms --SKIPIF-- ?php -if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); // Skip if being run by root (files are always readable, writeable and executable) $filename = dirname(__FILE__)./copy_variation15_root_check.tmp; $fp = fopen($filename, 'w'); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.7r2=1.8diff_format=u Index: php-src/ext/standard/tests/file/copy_variation9.phpt diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.7 php-src/ext/standard/tests/file/copy_variation9.phpt:1.8 --- php-src/ext/standard/tests/file/copy_variation9.phpt:1.7Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/copy_variation9.phptTue Oct 21 12:48:37 2008 @@ -2,8 +2,8 @@ Test copy() function: usage variations - destination file access perms --SKIPIF-- ?php -if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); // Skip if being run by root (files are always readable, writeable and executable) $filename = dirname(__FILE__)./copy_variation9_root_check.tmp; http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.4 php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.5 --- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.4 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/fnmatch_basic.phpt Tue Oct 21 12:48:37 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Basic functionality --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_error.phpt diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.4 php-src/ext/standard/tests/file/fnmatch_error.phpt:1.5 --- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.4 Tue May 27 09:34:52 2008 +++ php-src/ext/standard/tests/file/fnmatch_error.phpt Tue Oct 21 12:48:37 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Error conditions --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.4 php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.5 --- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.4 Tue May 27 09:34:53 2008 +++ php-src/ext/standard/tests/file/fnmatch_variation.phpt Tue Oct 21 12:48:37 2008 @@ -2,8 +2,8 @@ Test fnmatch() function: Variations --SKIPIF-- ?php -if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) - die(skip do not run on MacOS/Windows); +if(substr(PHP_OS, 0, 3) == 'WIN') + die(skip do not run on Windows); ? --FILE-- ?php -- 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/phar/tests phar_oo_005.phpt
indeyetsTue Oct 21 12:59:45 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar/tests phar_oo_005.phpt Log: proper check for php-version http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_005.phpt?r1=1.9.2.3r2=1.9.2.4diff_format=u Index: php-src/ext/phar/tests/phar_oo_005.phpt diff -u php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.3 php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.4 --- php-src/ext/phar/tests/phar_oo_005.phpt:1.9.2.3 Tue Oct 21 12:26:35 2008 +++ php-src/ext/phar/tests/phar_oo_005.phpt Tue Oct 21 12:59:45 2008 @@ -4,7 +4,8 @@ ?php if (!extension_loaded(phar)) die(skip); if (!extension_loaded(spl)) die(skip SPL not available); -if (!version_compare(PHP_VERSION, 5.3, =)) die(skip requires 5.3); +if (version_compare(PHP_VERSION, 5.3, ) or version_compare(PHP_VERSION, 5.4, =)) +die(skip requires 5.3); ? --INI-- phar.require_hash=0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/phar/tests phar_oo_005.phpt
indeyetsTue Oct 21 13:00:30 2008 UTC Modified files: /php-src/ext/phar/tests phar_oo_005.phpt Log: MFB: proper check for php-version http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/phar_oo_005.phpt?r1=1.11r2=1.12diff_format=u Index: php-src/ext/phar/tests/phar_oo_005.phpt diff -u php-src/ext/phar/tests/phar_oo_005.phpt:1.11 php-src/ext/phar/tests/phar_oo_005.phpt:1.12 --- php-src/ext/phar/tests/phar_oo_005.phpt:1.11Fri Aug 1 13:36:18 2008 +++ php-src/ext/phar/tests/phar_oo_005.phpt Tue Oct 21 13:00:29 2008 @@ -4,7 +4,8 @@ ?php if (!extension_loaded(phar)) die(skip); if (!extension_loaded(spl)) die(skip SPL not available); -if (!version_compare(PHP_VERSION, 5.3, ==)) die(skip requires 5.3); +if (version_compare(PHP_VERSION, 5.3, ) or version_compare(PHP_VERSION, 5.4, =)) +die(skip requires 5.3); ? --INI-- phar.require_hash=0 -- 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/tests/file copy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
On Tue, Oct 21, 2008 at 5:07 PM, Antony Dovgal [EMAIL PROTECTED] wrote: On 21.10.2008 16:45, Alexey Zakhlestin wrote: indeyets Tue Oct 21 12:45:35 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/file copy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt Log: these tests work just fine on macos-x Do they? they do. although, I have a newer system # uname -a Darwin tv.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386 i386 iMac5,1 Darwin # cat ext/standard/tests/file/fnmatch_basic.diff 002+ 003+ Fatal error: Call to undefined function fnmatch() in /private/var/root/tony/php-src_5_3/ext/standard/tests/file/fnmatch_basic.php on line 10 002- bool(true) 003- bool(true) 004- bool(true) 005- bool(true) 006- bool(true) 007- bool(false) 008- *** Testing fnmatch() with other than file *** 009- bool(true) 010- bool(true) 011- bool(true) 012- bool(true) 013- bool(true) 014- 015- *** Done *** # uname -a Darwin Macon.local 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386 -- Wbr, Antony Dovgal -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- 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/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
indeyetsTue Oct 21 13:38:18 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard/tests/filefnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt Log: skip tests on systems without fnmatch() function (f.e.: old darwin) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.1 php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.2 --- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2.2.1 Tue Oct 21 12:45:35 2008 +++ php-src/ext/standard/tests/file/fnmatch_basic.phpt Tue Oct 21 13:38:18 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Basic functionality --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_error.phpt diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.2 php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.3 --- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2.2.2 Tue Oct 21 12:45:35 2008 +++ php-src/ext/standard/tests/file/fnmatch_error.phpt Tue Oct 21 13:38:18 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Error conditions --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.1.2.2.2.2r2=1.1.2.2.2.3diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.2 php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.3 --- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2.2.2 Tue Oct 21 12:45:35 2008 +++ php-src/ext/standard/tests/file/fnmatch_variation.phpt Tue Oct 21 13:38:18 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Variations --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
indeyetsTue Oct 21 13:38:57 2008 UTC Modified files: /php-src/ext/standard/tests/filefnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt Log: MFB: skip tests on systems without fnmatch() function (f.e.: old darwin) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.5 php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.6 --- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.5 Tue Oct 21 12:48:37 2008 +++ php-src/ext/standard/tests/file/fnmatch_basic.phpt Tue Oct 21 13:38:57 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Basic functionality --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_error.phpt diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.5 php-src/ext/standard/tests/file/fnmatch_error.phpt:1.6 --- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.5 Tue Oct 21 12:48:37 2008 +++ php-src/ext/standard/tests/file/fnmatch_error.phpt Tue Oct 21 13:38:57 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Error conditions --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.5 php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.6 --- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.5 Tue Oct 21 12:48:37 2008 +++ php-src/ext/standard/tests/file/fnmatch_variation.phpt Tue Oct 21 13:38:57 2008 @@ -2,8 +2,11 @@ Test fnmatch() function: Variations --SKIPIF-- ?php -if(substr(PHP_OS, 0, 3) == 'WIN') - die(skip do not run on Windows); +if (substr(PHP_OS, 0, 3) == 'WIN') +die(skip do not run on Windows); + +if (!function_exists('fnmatch')) +die(skip fnmatch() function is not available); ? --FILE-- ?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) /ext/standard/tests/file copy_variation15.phpt copy_variation9.phpt fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt
On Tue, Oct 21, 2008 at 5:49 PM, Antony Dovgal [EMAIL PROTECTED] wrote: On 21.10.2008 17:10, Alexey Zakhlestin wrote: they do. although, I have a newer system # uname -a Darwin tv.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386 i386 iMac5,1 Darwin Which means the tests should be disabled, as we cannot require certain MacOS version for users to be able to run our tests. Please revert the patch. I've updated the patch. Does something still break for you? -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- 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 exec.c
indeyetsThu Oct 16 11:59:37 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard exec.c Log: Fixed compilation warnings: tsrm_ls is not used here (anymore?) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.1.2.12r2=1.113.2.3.2.1.2.13diff_format=u Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.113.2.3.2.1.2.12 php-src/ext/standard/exec.c:1.113.2.3.2.1.2.13 --- php-src/ext/standard/exec.c:1.113.2.3.2.1.2.12 Sun Aug 17 15:23:45 2008 +++ php-src/ext/standard/exec.c Thu Oct 16 11:59:37 2008 @@ -16,7 +16,7 @@ | Ilia Alshanetsky [EMAIL PROTECTED] | +--+ */ -/* $Id: exec.c,v 1.113.2.3.2.1.2.12 2008/08/17 15:23:45 pajoye Exp $ */ +/* $Id: exec.c,v 1.113.2.3.2.1.2.13 2008/10/16 11:59:37 indeyets Exp $ */ #include stdio.h #include php.h @@ -268,8 +268,6 @@ char *cmd; char *p = NULL; size_t estimate = (2 * l) + 1; - - TSRMLS_FETCH(); cmd = safe_emalloc(2, l, 1); @@ -358,7 +356,6 @@ int x, y = 0, l = strlen(str); char *cmd; size_t estimate = (4 * l) + 3; - TSRMLS_FETCH(); cmd = safe_emalloc(4, l, 3); /* worst case */ -- 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 regcomp.c regcomp.ih /ext/simplexml simplexml.c
indeyetsThu Oct 16 11:38:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/ereg/regex regcomp.c regcomp.ih /php-src/ext/simplexml simplexml.c Log: propagated const, to avoid discards qualifiers from pointer target type errors http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regcomp.c?r1=1.7.2.2r2=1.7.2.3diff_format=u Index: php-src/ext/ereg/regex/regcomp.c diff -u php-src/ext/ereg/regex/regcomp.c:1.7.2.2 php-src/ext/ereg/regex/regcomp.c:1.7.2.3 --- php-src/ext/ereg/regex/regcomp.c:1.7.2.2Fri Oct 5 15:00:06 2007 +++ php-src/ext/ereg/regex/regcomp.cThu Oct 16 11:38:25 2008 @@ -724,9 +724,9 @@ register cset *cs; { register unsigned char *sp = p-next; - register struct cclass *cp; + register const struct cclass *cp; register size_t len; - register unsigned char *u; + register const unsigned char *u; register unsigned char c; while (MORE() isalpha(PEEK())) @@ -795,7 +795,7 @@ int endc; /* name ended by endc,']' */ { register unsigned char *sp = p-next; - register struct cname *cp; + register const struct cname *cp; register int len; while (MORE() !SEETWO(endc, ']')) @@ -1153,7 +1153,7 @@ mcadd(p, cs, cp) register struct parse *p; register cset *cs; -register unsigned char *cp; +register const unsigned char *cp; { register size_t oldend = cs-smultis; http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regcomp.ih?r1=1.5.8.2r2=1.5.8.3diff_format=u Index: php-src/ext/ereg/regex/regcomp.ih diff -u php-src/ext/ereg/regex/regcomp.ih:1.5.8.2 php-src/ext/ereg/regex/regcomp.ih:1.5.8.3 --- php-src/ext/ereg/regex/regcomp.ih:1.5.8.2 Fri Oct 5 15:00:06 2007 +++ php-src/ext/ereg/regex/regcomp.ih Thu Oct 16 11:38:25 2008 @@ -27,7 +27,7 @@ static int freezeset(register struct parse *p, register cset *cs); static int firstch(register struct parse *p, register cset *cs); static int nch(register struct parse *p, register cset *cs); -static void mcadd(register struct parse *p, register cset *cs, register unsigned char *cp); +static void mcadd(register struct parse *p, register cset *cs, register const unsigned char *cp); #if 0 static void mcsub(register cset *cs, register unsigned char *cp); static int mcin(register cset *cs, register unsigned char *cp); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.20r2=1.151.2.22.2.35.2.21diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.20 php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.21 --- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.20 Thu Sep 11 14:21:33 2008 +++ php-src/ext/simplexml/simplexml.c Thu Oct 16 11:38:25 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.151.2.22.2.35.2.20 2008/09/11 14:21:33 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.151.2.22.2.35.2.21 2008/10/16 11:38:25 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -67,7 +67,7 @@ /* {{{ _node_as_zval() */ -static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, xmlChar *nsprefix, int isprefix TSRMLS_DC) +static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, const xmlChar *nsprefix, int isprefix TSRMLS_DC) { php_sxe_object *subnode; @@ -79,7 +79,7 @@ subnode-iter.name = xmlStrdup((xmlChar *)name); } if (nsprefix *nsprefix) { - subnode-iter.nsprefix = xmlStrdup((xmlChar *)nsprefix); + subnode-iter.nsprefix = xmlStrdup(nsprefix); subnode-iter.isprefix = isprefix; } @@ -2562,7 +2562,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.35.2.20 $); + php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.35.2.21 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard exec.c
indeyetsThu Oct 16 12:21:27 2008 UTC Modified files: /php-src/ext/standard exec.c Log: MFB: Fixed compilation warnings: tsrm_ls is not used here (anymore?) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.136r2=1.137diff_format=u Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.136 php-src/ext/standard/exec.c:1.137 --- php-src/ext/standard/exec.c:1.136 Sun Aug 17 15:23:22 2008 +++ php-src/ext/standard/exec.c Thu Oct 16 12:21:27 2008 @@ -16,7 +16,7 @@ | Ilia Alshanetsky [EMAIL PROTECTED] | +--+ */ -/* $Id: exec.c,v 1.136 2008/08/17 15:23:22 pajoye Exp $ */ +/* $Id: exec.c,v 1.137 2008/10/16 12:21:27 indeyets Exp $ */ #include stdio.h #include php.h @@ -253,8 +253,6 @@ char *cmd; char *p = NULL; size_t estimate = (2 * l) + 1; - - TSRMLS_FETCH(); cmd = safe_emalloc(2, l, 1); @@ -343,7 +341,6 @@ int x, y = 0, l = strlen(str); char *cmd; size_t estimate = (4 * l) + 3; - TSRMLS_FETCH(); cmd = safe_emalloc(4, l, 3); /* worst case */ -- 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 regcomp.c regcomp.ih /ext/simplexml simplexml.c
indeyetsThu Oct 16 11:42:20 2008 UTC Modified files: /php-src/ext/ereg/regex regcomp.c regcomp.ih /php-src/ext/simplexml simplexml.c Log: MFB: propagated const, to avoid discards qualifiers from pointer target type errors http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regcomp.c?r1=1.7r2=1.8diff_format=u Index: php-src/ext/ereg/regex/regcomp.c diff -u php-src/ext/ereg/regex/regcomp.c:1.7 php-src/ext/ereg/regex/regcomp.c:1.8 --- php-src/ext/ereg/regex/regcomp.c:1.7Thu Oct 12 01:05:25 2006 +++ php-src/ext/ereg/regex/regcomp.cThu Oct 16 11:42:20 2008 @@ -724,9 +724,9 @@ register cset *cs; { register unsigned char *sp = p-next; - register struct cclass *cp; + register const struct cclass *cp; register size_t len; - register unsigned char *u; + register const unsigned char *u; register unsigned char c; while (MORE() isalpha(PEEK())) @@ -795,7 +795,7 @@ int endc; /* name ended by endc,']' */ { register unsigned char *sp = p-next; - register struct cname *cp; + register const struct cname *cp; register int len; while (MORE() !SEETWO(endc, ']')) @@ -1153,7 +1153,7 @@ mcadd(p, cs, cp) register struct parse *p; register cset *cs; -register unsigned char *cp; +register const unsigned char *cp; { register size_t oldend = cs-smultis; http://cvs.php.net/viewvc.cgi/php-src/ext/ereg/regex/regcomp.ih?r1=1.5r2=1.6diff_format=u Index: php-src/ext/ereg/regex/regcomp.ih diff -u php-src/ext/ereg/regex/regcomp.ih:1.5 php-src/ext/ereg/regex/regcomp.ih:1.6 --- php-src/ext/ereg/regex/regcomp.ih:1.5 Tue Sep 30 00:26:03 2003 +++ php-src/ext/ereg/regex/regcomp.ih Thu Oct 16 11:42:20 2008 @@ -27,7 +27,7 @@ static int freezeset(register struct parse *p, register cset *cs); static int firstch(register struct parse *p, register cset *cs); static int nch(register struct parse *p, register cset *cs); -static void mcadd(register struct parse *p, register cset *cs, register unsigned char *cp); +static void mcadd(register struct parse *p, register cset *cs, register const unsigned char *cp); #if 0 static void mcsub(register cset *cs, register unsigned char *cp); static int mcin(register cset *cs, register unsigned char *cp); http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.261r2=1.262diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.261 php-src/ext/simplexml/simplexml.c:1.262 --- php-src/ext/simplexml/simplexml.c:1.261 Thu Sep 11 14:20:30 2008 +++ php-src/ext/simplexml/simplexml.c Thu Oct 16 11:42:20 2008 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: simplexml.c,v 1.261 2008/09/11 14:20:30 rrichards Exp $ */ +/* $Id: simplexml.c,v 1.262 2008/10/16 11:42:20 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -69,7 +69,7 @@ /* {{{ _node_as_zval() */ -static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, xmlChar *nsprefix, int isprefix TSRMLS_DC) +static void _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value, SXE_ITER itertype, char *name, const xmlChar *nsprefix, int isprefix TSRMLS_DC) { php_sxe_object *subnode; @@ -81,7 +81,7 @@ subnode-iter.name = xmlStrdup((xmlChar *)name); } if (nsprefix *nsprefix) { - subnode-iter.nsprefix = xmlStrdup((xmlChar *)nsprefix); + subnode-iter.nsprefix = xmlStrdup(nsprefix); subnode-iter.isprefix = isprefix; } @@ -2644,7 +2644,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, Simplexml support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.261 $); + php_info_print_table_row(2, Revision, $Revision: 1.262 $); php_info_print_table_row(2, Schema support, #ifdef LIBXML_SCHEMAS_ENABLED enabled); -- 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/pcntl/tests 002.phpt
indeyetsMon Sep 8 12:08:41 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pcntl/tests002.phpt Log: pcntl_sigwaitinfo() and pcntl_sigtimedwait() functions are conditionally enabled, so, test should verify if they are present http://cvs.php.net/viewvc.cgi/php-src/ext/pcntl/tests/002.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/pcntl/tests/002.phpt diff -u php-src/ext/pcntl/tests/002.phpt:1.1.2.3 php-src/ext/pcntl/tests/002.phpt:1.1.2.4 --- php-src/ext/pcntl/tests/002.phpt:1.1.2.3Tue Aug 5 15:12:19 2008 +++ php-src/ext/pcntl/tests/002.phptMon Sep 8 12:08:41 2008 @@ -4,6 +4,7 @@ ?php if (!extension_loaded('pcntl')) die('skip pcntl extension not available'); elseif (!extension_loaded('posix')) die('skip posix extension not available'); + elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available'); ? --FILE-- ?php -- 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/snmp snmp.c
indeyetsSat Sep 6 07:57:22 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/snmp snmp.c Log: Fixed bug #45405 (snmp extension memory leak) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.306r2=1.2027.2.547.2.965.2.307diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.306 php-src/NEWS:1.2027.2.547.2.965.2.307 --- php-src/NEWS:1.2027.2.547.2.965.2.306 Tue Sep 2 08:58:18 2008 +++ php-src/NEWSSat Sep 6 07:57:21 2008 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 200?, PHP 5.3.0 Alpha 3 +- Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo + Campos) 02 Sep 2008, PHP 5.3.0 Alpha 2 - Removed special treatment of /tmp in sessions for open_basedir. http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.5.2.5r2=1.106.2.2.2.5.2.6diff_format=u Index: php-src/ext/snmp/snmp.c diff -u 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.6 --- php-src/ext/snmp/snmp.c:1.106.2.2.2.5.2.5 Wed Aug 13 14:06:21 2008 +++ php-src/ext/snmp/snmp.c Sat Sep 6 07:57:22 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: snmp.c,v 1.106.2.2.2.5.2.5 2008/08/13 14:06:21 felipe Exp $ */ +/* $Id: snmp.c,v 1.106.2.2.2.5.2.6 2008/09/06 07:57:22 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -627,13 +627,13 @@ while (keepwalking) { keepwalking = 0; if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) { - pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); name_length = MAX_OID_LEN; if (!snmp_parse_oid(objid, name, name_length)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid object identifier: %s, objid); snmp_close(ss); RETURN_FALSE; } + pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, name, name_length); } else if (st == SNMP_CMD_SET) { pdu = snmp_pdu_create(SNMP_MSG_SET); @@ -644,6 +644,7 @@ sprint_objid(buf, name, name_length); #endif php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not add variable: %s %c %s, buf, type, value); + snmp_free_pdu(pdu); snmp_close(ss); RETURN_FALSE; } @@ -677,11 +678,13 @@ *return_value = *snmpval; zval_copy_ctor(return_value); zval_ptr_dtor(snmpval); + snmp_free_pdu(pdu); snmp_close(ss); return; } else if (st == SNMP_CMD_GETNEXT) { *return_value = *snmpval; zval_copy_ctor(return_value); + snmp_free_pdu(pdu); snmp_close(ss); return; } else if (st == SNMP_CMD_WALK) { @@ -720,23 +723,28 @@ } if (st == SNMP_CMD_GET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) { + snmp_free_pdu(pdu); goto retry; } } else if (st == SNMP_CMD_SET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) { + snmp_free_pdu(pdu); goto retry; } } else if (st == SNMP_CMD_GETNEXT) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GETNEXT)) != NULL) { + snmp_free_pdu(pdu); goto retry;
[PHP-CVS] cvs: php-src /ext/snmp snmp.c
indeyetsSat Sep 6 07:58:09 2008 UTC Modified files: /php-src/ext/snmp snmp.c Log: MFB: Fixed bug #45405 (snmp extension memory leak) http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.118r2=1.119diff_format=u Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.118 php-src/ext/snmp/snmp.c:1.119 --- php-src/ext/snmp/snmp.c:1.118 Wed Aug 13 14:05:55 2008 +++ php-src/ext/snmp/snmp.c Sat Sep 6 07:58:09 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: snmp.c,v 1.118 2008/08/13 14:05:55 felipe Exp $ */ +/* $Id: snmp.c,v 1.119 2008/09/06 07:58:09 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -627,13 +627,13 @@ while (keepwalking) { keepwalking = 0; if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) { - pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); name_length = MAX_OID_LEN; if (!snmp_parse_oid(objid, name, name_length)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid object identifier: %s, objid); snmp_close(ss); RETURN_FALSE; } + pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, name, name_length); } else if (st == SNMP_CMD_SET) { pdu = snmp_pdu_create(SNMP_MSG_SET); @@ -644,6 +644,7 @@ sprint_objid(buf, name, name_length); #endif php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not add variable: %s %c %s, buf, type, value); + snmp_free_pdu(pdu); snmp_close(ss); RETURN_FALSE; } @@ -677,11 +678,13 @@ *return_value = *snmpval; zval_copy_ctor(return_value); zval_ptr_dtor(snmpval); + snmp_free_pdu(pdu); snmp_close(ss); return; } else if (st == SNMP_CMD_GETNEXT) { *return_value = *snmpval; zval_copy_ctor(return_value); + snmp_free_pdu(pdu); snmp_close(ss); return; } else if (st == SNMP_CMD_WALK) { @@ -720,23 +723,28 @@ } if (st == SNMP_CMD_GET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) { + snmp_free_pdu(pdu); goto retry; } } else if (st == SNMP_CMD_SET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) { + snmp_free_pdu(pdu); goto retry; } } else if (st == SNMP_CMD_GETNEXT) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GETNEXT)) != NULL) { + snmp_free_pdu(pdu); goto retry; } } else if (st = SNMP_CMD_WALK) { /* Here we do walks. */ if ((pdu = snmp_fix_pdu(response, ((session-version == SNMP_VERSION_1) ? SNMP_MSG_GETNEXT : SNMP_MSG_GETBULK))) != NULL) { + snmp_free_pdu(pdu); goto retry; } } + snmp_free_pdu(pdu); snmp_close(ss);
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/snmp snmp.c
indeyetsSat Sep 6 08:18:38 2008 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/snmp snmp.c Log: MFB: Fixed bug #45405 (snmp extension memory leak) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1212r2=1.2027.2.547.2.1213diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1212 php-src/NEWS:1.2027.2.547.2.1213 --- php-src/NEWS:1.2027.2.547.2.1212Tue Sep 2 13:21:59 2008 +++ php-src/NEWSSat Sep 6 08:18:37 2008 @@ -19,6 +19,8 @@ - Fixed a crash on invalid method in ReflectionParameter constructor. (Christian Seiler) +- Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo + Campos) - Fixed bug #45956 (parse_ini_file() does not return false with syntax errors in parsed file). (Jani) - Fixed bug #45862 (get_class_vars is inconsistent with 'protected' and http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.6r2=1.106.2.2.2.7diff_format=u Index: php-src/ext/snmp/snmp.c diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.6 php-src/ext/snmp/snmp.c:1.106.2.2.2.7 --- php-src/ext/snmp/snmp.c:1.106.2.2.2.6 Mon Dec 31 07:20:11 2007 +++ php-src/ext/snmp/snmp.c Sat Sep 6 08:18:38 2008 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: snmp.c,v 1.106.2.2.2.6 2007/12/31 07:20:11 sebastian Exp $ */ +/* $Id: snmp.c,v 1.106.2.2.2.7 2008/09/06 08:18:38 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -417,13 +417,13 @@ while (keepwalking) { keepwalking = 0; if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) { - pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); name_length = MAX_OID_LEN; if (!snmp_parse_oid(objid, name, name_length)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid object identifier: %s, objid); snmp_close(ss); RETURN_FALSE; } + pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, name, name_length); } else if (st == SNMP_CMD_SET) { pdu = snmp_pdu_create(SNMP_MSG_SET); @@ -434,6 +434,7 @@ sprint_objid(buf, name, name_length); #endif php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not add variable: %s %c %s, buf, type, value); + snmp_free_pdu(pdu); snmp_close(ss); RETURN_FALSE; } @@ -467,11 +468,13 @@ *return_value = *snmpval; zval_copy_ctor(return_value); zval_ptr_dtor(snmpval); + snmp_free_pdu(response); snmp_close(ss); return; } else if (st == SNMP_CMD_GETNEXT) { *return_value = *snmpval; zval_copy_ctor(return_value); + snmp_free_pdu(response); snmp_close(ss); return; } else if (st == SNMP_CMD_WALK) { @@ -510,23 +513,28 @@ } if (st == SNMP_CMD_GET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) { + snmp_free_pdu(response); goto retry; } } else if (st == SNMP_CMD_SET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) { + snmp_free_pdu(response); goto retry; } } else if (st == SNMP_CMD_GETNEXT) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GETNEXT)) != NULL) { + snmp_free_pdu(response); goto retry; }
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS
indeyetsSat Sep 6 08:19:34 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: bugfix is also applied to 5.2, so NEWS moved there http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.307r2=1.2027.2.547.2.965.2.308diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.307 php-src/NEWS:1.2027.2.547.2.965.2.308 --- php-src/NEWS:1.2027.2.547.2.965.2.307 Sat Sep 6 07:57:21 2008 +++ php-src/NEWSSat Sep 6 08:19:33 2008 @@ -1,8 +1,6 @@ PHPNEWS ||| ?? ??? 200?, PHP 5.3.0 Alpha 3 -- Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo - Campos) 02 Sep 2008, PHP 5.3.0 Alpha 2 - Removed special treatment of /tmp in sessions for open_basedir. -- 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/session mod_files.c /ext/session/tests session_save_path_variation5.phpt
indeyetsSun Aug 31 14:49:58 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/sessionmod_files.c /php-src/ext/session/tests session_save_path_variation5.phpt Log: remove special treatment of /tmp path http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.100.2.3.2.10.2.1r2=1.100.2.3.2.10.2.2diff_format=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.100.2.3.2.10.2.1 php-src/ext/session/mod_files.c:1.100.2.3.2.10.2.2 --- php-src/ext/session/mod_files.c:1.100.2.3.2.10.2.1 Mon Dec 31 07:17:13 2007 +++ php-src/ext/session/mod_files.c Sun Aug 31 14:49:57 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.100.2.3.2.10.2.1 2007/12/31 07:17:13 sebastian Exp $ */ +/* $Id: mod_files.c,v 1.100.2.3.2.10.2.2 2008/08/31 14:49:57 indeyets Exp $ */ #include php.h @@ -278,13 +278,11 @@ /* if save path is an empty string, determine the temporary dir */ save_path = php_get_temporary_directory(); - if (strcmp(save_path, /tmp)) { - if (PG(safe_mode) (!php_checkuid(save_path, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { - return FAILURE; - } - if (php_check_open_basedir(save_path TSRMLS_CC)) { - return FAILURE; - } + if (PG(safe_mode) (!php_checkuid(save_path, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + return FAILURE; + } + if (php_check_open_basedir(save_path TSRMLS_CC)) { + return FAILURE; } } http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_save_path_variation5.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/session/tests/session_save_path_variation5.phpt diff -u php-src/ext/session/tests/session_save_path_variation5.phpt:1.1.2.3 php-src/ext/session/tests/session_save_path_variation5.phpt:1.1.2.4 --- php-src/ext/session/tests/session_save_path_variation5.phpt:1.1.2.3 Wed Apr 30 15:20:18 2008 +++ php-src/ext/session/tests/session_save_path_variation5.phpt Sun Aug 31 14:49:58 2008 @@ -36,10 +36,6 @@ var_dump(chdir($sessions)); ini_set(session.save_path, $directory); var_dump(session_save_path()); -var_dump(session_start()); -var_dump(session_save_path()); -var_dump(session_destroy()); -var_dump(session_save_path()); var_dump(rmdir($sessions)); echo Done; @@ -57,9 +53,5 @@ Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d string(0) bool(true) -string(0) -bool(true) -string(0) -bool(true) Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session mod_files.c /ext/session/tests session_save_path_variation5.phpt
indeyetsSun Aug 31 14:50:10 2008 UTC Modified files: /php-src/ext/sessionmod_files.c /php-src/ext/session/tests session_save_path_variation5.phpt Log: remove special treatment of /tmp path http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.118r2=1.119diff_format=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.118 php-src/ext/session/mod_files.c:1.119 --- php-src/ext/session/mod_files.c:1.118 Wed May 21 12:01:55 2008 +++ php-src/ext/session/mod_files.c Sun Aug 31 14:50:10 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.118 2008/05/21 12:01:55 tony2001 Exp $ */ +/* $Id: mod_files.c,v 1.119 2008/08/31 14:50:10 indeyets Exp $ */ #include php.h @@ -296,10 +296,8 @@ /* if save path is an empty string, determine the temporary dir */ save_path = php_get_temporary_directory(); - if (strcmp(save_path, /tmp)) { - if (php_check_open_basedir(save_path TSRMLS_CC)) { - return FAILURE; - } + if (php_check_open_basedir(save_path TSRMLS_CC)) { + return FAILURE; } } http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_save_path_variation5.phpt?r1=1.6r2=1.7diff_format=u Index: php-src/ext/session/tests/session_save_path_variation5.phpt diff -u php-src/ext/session/tests/session_save_path_variation5.phpt:1.6 php-src/ext/session/tests/session_save_path_variation5.phpt:1.7 --- php-src/ext/session/tests/session_save_path_variation5.phpt:1.6 Tue May 27 18:16:04 2008 +++ php-src/ext/session/tests/session_save_path_variation5.phpt Sun Aug 31 14:50:10 2008 @@ -36,10 +36,6 @@ var_dump(chdir($sessions)); ini_set(session.save_path, $directory); var_dump(session_save_path()); -var_dump(session_start()); -var_dump(session_save_path()); -var_dump(session_destroy()); -var_dump(session_save_path()); var_dump(rmdir($sessions)); echo Done; @@ -59,10 +55,6 @@ Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d unicode(0) bool(true) -unicode(0) -bool(true) -unicode(0) -bool(true) Done -- 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
indeyetsSun Aug 31 14:56:15 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: added entry about change in ext/session http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.297r2=1.2027.2.547.2.965.2.298diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.297 php-src/NEWS:1.2027.2.547.2.965.2.298 --- php-src/NEWS:1.2027.2.547.2.965.2.297 Sun Aug 31 10:20:57 2008 +++ php-src/NEWSSun Aug 31 14:56:14 2008 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 200?, PHP 5.3.0 Alpha 2 +- Removed special treatment of /tmp path for sessions in open_basedir + context. (Alexey) - Changed bundled libmagic to use PHP memory allocation routines. (Ilia) - Changed bundled libmagic to use pcre instead of ereg. (Derick, Scott, Mikko) - Updated mime_content_type to use fileinfo. (Derick) -- 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
indeyetsSun Aug 31 15:04:22 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS Log: more detailed news-entry http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.298r2=1.2027.2.547.2.965.2.299diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.298 php-src/NEWS:1.2027.2.547.2.965.2.299 --- php-src/NEWS:1.2027.2.547.2.965.2.298 Sun Aug 31 14:56:14 2008 +++ php-src/NEWSSun Aug 31 15:04:21 2008 @@ -2,7 +2,7 @@ ||| ?? ??? 200?, PHP 5.3.0 Alpha 2 - Removed special treatment of /tmp path for sessions in open_basedir - context. (Alexey) + context, which was introduced in 5.2.2, but was never documented. (Alexey) - Changed bundled libmagic to use PHP memory allocation routines. (Ilia) - Changed bundled libmagic to use pcre instead of ereg. (Derick, Scott, Mikko) - Updated mime_content_type to use fileinfo. (Derick) -- 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/session/tests session_id_error4.phpt
indeyetsTue Aug 26 16:46:27 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/session/tests session_id_error4.phpt Log: this test depends on session.hash_bits_per_character, but it was not explicitly set http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_id_error4.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/session/tests/session_id_error4.phpt diff -u php-src/ext/session/tests/session_id_error4.phpt:1.1.2.3 php-src/ext/session/tests/session_id_error4.phpt:1.1.2.4 --- php-src/ext/session/tests/session_id_error4.phpt:1.1.2.3Wed Aug 6 05:53:31 2008 +++ php-src/ext/session/tests/session_id_error4.phptTue Aug 26 16:46:26 2008 @@ -4,6 +4,7 @@ ?php include('skipif.inc'); ? --INI-- session.hash_function=0 +session.hash_bits_per_character=4 --FILE-- ?php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/session/tests session_id_error4.phpt
indeyetsTue Aug 26 16:51:18 2008 UTC Modified files: /php-src/ext/session/tests session_id_error4.phpt Log: MFB: this test depends on session.hash_bits_per_character, but it was not explicitly set http://cvs.php.net/viewvc.cgi/php-src/ext/session/tests/session_id_error4.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/session/tests/session_id_error4.phpt diff -u php-src/ext/session/tests/session_id_error4.phpt:1.4 php-src/ext/session/tests/session_id_error4.phpt:1.5 --- php-src/ext/session/tests/session_id_error4.phpt:1.4Tue Jul 15 00:59:29 2008 +++ php-src/ext/session/tests/session_id_error4.phptTue Aug 26 16:51:18 2008 @@ -4,6 +4,7 @@ ?php include('skipif.inc'); ? --INI-- session.hash_function=0 +session.hash_bits_per_character=4 --FILE-- ?php -- 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) /sapi/apache2handler php_functions.c
indeyetsTue Aug 26 17:34:17 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/apache2handlerphp_functions.c Log: switch to the new parameter-parse API http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/php_functions.c?r1=1.18.2.6.2.5.2.4r2=1.18.2.6.2.5.2.5diff_format=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.18.2.6.2.5.2.4 php-src/sapi/apache2handler/php_functions.c:1.18.2.6.2.5.2.5 --- php-src/sapi/apache2handler/php_functions.c:1.18.2.6.2.5.2.4Wed Jul 16 11:59:15 2008 +++ php-src/sapi/apache2handler/php_functions.c Tue Aug 26 17:34:16 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.18.2.6.2.5.2.4 2008/07/16 11:59:15 felipe Exp $ */ +/* $Id: php_functions.c,v 1.18.2.6.2.5.2.5 2008/08/26 17:34:16 indeyets Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -71,23 +71,21 @@ Perform an apache sub-request */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + int filename_len; request_rec *rr; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } if (rr-status != HTTP_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -101,7 +99,7 @@ ap_rflush(rr-main); if (ap_run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -120,16 +118,15 @@ PHP_FUNCTION(apache_lookup_uri) { request_rec *rr; - zval **filename; + char *filename; + int filename_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } @@ -166,7 +163,7 @@ return; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -224,31 +221,28 @@ PHP_FUNCTION(apache_note) { php_struct *ctx; - zval **note_name, **note_val; + char *note_name, *note_val; + int note_name_len, note_val_len; char *old_note_val=NULL; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, note_name, note_val) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - + ctx = SG(server_context); - - convert_to_string_ex(note_name); - old_note_val = (char *) apr_table_get(ctx-r-notes, Z_STRVAL_PP(note_name)); - + old_note_val = (char *) apr_table_get(ctx-r-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(note_val); - apr_table_set(ctx-r-notes, Z_STRVAL_PP(note_name), Z_STRVAL_PP(note_val)); +
[PHP-CVS] cvs: php-src /sapi/apache2handler php_functions.c
indeyetsTue Aug 26 17:36:33 2008 UTC Modified files: /php-src/sapi/apache2handlerphp_functions.c Log: MFB: switch to the new parameter-parse API http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/php_functions.c?r1=1.33r2=1.34diff_format=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.33 php-src/sapi/apache2handler/php_functions.c:1.34 --- php-src/sapi/apache2handler/php_functions.c:1.33Wed Jul 16 11:59:34 2008 +++ php-src/sapi/apache2handler/php_functions.c Tue Aug 26 17:36:33 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_functions.c,v 1.33 2008/07/16 11:59:34 felipe Exp $ */ +/* $Id: php_functions.c,v 1.34 2008/08/26 17:36:33 indeyets Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -71,23 +71,21 @@ Perform an apache sub-request */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + int filename_len; request_rec *rr; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } if (rr-status != HTTP_OK) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -101,7 +99,7 @@ ap_rflush(rr-main); if (ap_run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -120,16 +118,15 @@ PHP_FUNCTION(apache_lookup_uri) { request_rec *rr; - zval **filename; + char *filename; + int filename_len; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - - if (!(rr = php_apache_lookup_uri(Z_STRVAL_PP(filename) TSRMLS_CC))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, Z_STRVAL_PP(filename)); + if (!(rr = php_apache_lookup_uri(filename TSRMLS_CC))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); RETURN_FALSE; } @@ -166,7 +163,7 @@ return; } - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, Z_STRVAL_PP(filename)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); ap_destroy_sub_req(rr); RETURN_FALSE; } @@ -224,31 +221,28 @@ PHP_FUNCTION(apache_note) { php_struct *ctx; - zval **note_name, **note_val; + char *note_name, *note_val; + int note_name_len, note_val_len; char *old_note_val=NULL; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, note_name, note_val) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - + ctx = SG(server_context); - - convert_to_string_ex(note_name); - old_note_val = (char *) apr_table_get(ctx-r-notes, Z_STRVAL_PP(note_name)); - + old_note_val = (char *) apr_table_get(ctx-r-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(note_val); - apr_table_set(ctx-r-notes, Z_STRVAL_PP(note_name), Z_STRVAL_PP(note_val)); + apr_table_set(ctx-r-notes, note_name, note_val); } if (old_note_val) {
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c
indeyetsMon Jul 7 09:47:03 2008 UTC Modified files: /php-src/ext/mbstring mbstring.c Log: MFB: added arginfo (fixes #45388) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.277r2=1.278diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.277 php-src/ext/mbstring/mbstring.c:1.278 --- php-src/ext/mbstring/mbstring.c:1.277 Fri Jun 13 14:47:48 2008 +++ php-src/ext/mbstring/mbstring.c Mon Jul 7 09:47:02 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.277 2008/06/13 14:47:48 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.278 2008/07/07 09:47:02 indeyets Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -169,6 +169,26 @@ ZEND_ARG_PASS_INFO(0) ZEND_END_ARG_INFO() +static + ZEND_BEGIN_ARG_INFO_EX(mb_parse_str_arginfo, 0, 0, 1) + ZEND_ARG_INFO(0, encoded_string) + ZEND_ARG_ARRAY_INFO(1, result, 1) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO_EX(mb_convert_variables_arginfo, 1, 0, 3) + ZEND_ARG_INFO(0, to_encoding) + ZEND_ARG_INFO(0, from_encoding) + ZEND_ARG_INFO(1, vars) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO_EX(mb_ereg_arginfo, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, regs) + ZEND_END_ARG_INFO() + /* {{{ mb_overload_def mb_ovld[] */ static const struct mb_overload_def mb_ovld[] = { {MB_OVERLOAD_MAIL, mail, mb_send_mail, mb_orig_mail}, @@ -206,7 +226,7 @@ PHP_FE(mb_http_output, NULL) PHP_FE(mb_detect_order, NULL) PHP_FE(mb_substitute_character, NULL) - PHP_FE(mb_parse_str,second_arg_force_ref) + PHP_FE(mb_parse_str,mb_parse_str_arginfo) PHP_FE(mb_output_handler, NULL) PHP_FE(mb_preferred_mime_name, NULL) PHP_FE(mb_strlen, NULL) @@ -231,7 +251,7 @@ PHP_FE(mb_convert_kana, NULL) PHP_FE(mb_encode_mimeheader,NULL) PHP_FE(mb_decode_mimeheader,NULL) - PHP_FE(mb_convert_variables,third_and_rest_force_ref) + PHP_FE(mb_convert_variables,mb_convert_variables_arginfo) PHP_FE(mb_encode_numericentity, NULL) PHP_FE(mb_decode_numericentity, NULL) PHP_FE(mb_send_mail,NULL) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c
indeyetsMon Jul 7 09:57:12 2008 UTC Modified files: /php-src/ext/mbstring mbstring.c Log: MFB: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.278r2=1.279diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.278 php-src/ext/mbstring/mbstring.c:1.279 --- php-src/ext/mbstring/mbstring.c:1.278 Mon Jul 7 09:47:02 2008 +++ php-src/ext/mbstring/mbstring.c Mon Jul 7 09:57:12 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.278 2008/07/07 09:47:02 indeyets Exp $ */ +/* $Id: mbstring.c,v 1.279 2008/07/07 09:57:12 indeyets Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -1292,12 +1292,17 @@ Sets the current detect_order or Return the current detect_order as a array */ PHP_FUNCTION(mb_detect_order) { - zval **arg1; + size_t argc = ZEND_NUM_ARGS(); + zval *arg1; int n, size; enum mbfl_no_encoding *list, *entry; char *name; - if (ZEND_NUM_ARGS() == 0) { + if (zend_parse_parameters(argc TSRMLS_CC, |z, arg1) == FAILURE) { + return; + } + + if (argc == 0) { array_init(return_value); entry = MBSTRG(current_detect_order_list); n = MBSTRG(current_detect_order_list_size); @@ -1309,12 +1314,12 @@ entry++; n--; } - } else if (ZEND_NUM_ARGS() == 1 zend_get_parameters_ex(1, arg1) != FAILURE) { + } else { list = NULL; size = 0; - switch (Z_TYPE_PP(arg1)) { + switch (Z_TYPE_P(arg1)) { case IS_ARRAY: - if (!php_mb_parse_encoding_array(*arg1, list, size, 0 TSRMLS_CC)) { + if (!php_mb_parse_encoding_array(arg1, list, size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1322,8 +1327,8 @@ } break; default: - convert_to_string_ex(arg1); - if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), list, size, 0 TSRMLS_CC)) { + convert_to_string_ex(arg1); + if (!php_mb_parse_encoding_list(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), list, size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1331,18 +1336,17 @@ } break; } + if (list == NULL) { - RETVAL_FALSE; - } else { - if (MBSTRG(current_detect_order_list)) { - efree(MBSTRG(current_detect_order_list)); - } - MBSTRG(current_detect_order_list) = list; - MBSTRG(current_detect_order_list_size) = size; - RETVAL_TRUE; + RETURN_FALSE; } - } else { - WRONG_PARAM_COUNT; + + if (MBSTRG(current_detect_order_list)) { + efree(MBSTRG(current_detect_order_list)); + } + MBSTRG(current_detect_order_list) = list; + MBSTRG(current_detect_order_list_size) = size; + RETURN_TRUE; } } /* }}} */ @@ -1351,52 +1355,56 @@ Sets the current substitute_character or returns the current substitute_character */ PHP_FUNCTION(mb_substitute_character) { - zval **arg1; + zval *arg1; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |z, arg1) == FAILURE) { + return; + } if (ZEND_NUM_ARGS() == 0) { if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { - RETVAL_STRING(none, 1); + RETURN_STRING(none, 1); } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { - RETVAL_STRING(long, 1); + RETURN_STRING(long, 1); } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { - RETVAL_STRING(entity, 1); + RETURN_STRING(entity, 1); } else { - RETVAL_LONG(MBSTRG(current_filter_illegal_substchar)); + RETURN_LONG(MBSTRG(current_filter_illegal_substchar)); } - } else if (ZEND_NUM_ARGS() == 1 zend_get_parameters_ex(1, arg1) != FAILURE) { + } else {
[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c
indeyetsMon Jul 7 10:00:31 2008 UTC Modified files: /php-src/ext/mbstring mbstring.c Log: MFB: string length - int http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.279r2=1.280diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.279 php-src/ext/mbstring/mbstring.c:1.280 --- php-src/ext/mbstring/mbstring.c:1.279 Mon Jul 7 09:57:12 2008 +++ php-src/ext/mbstring/mbstring.c Mon Jul 7 10:00:30 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.279 2008/07/07 09:57:12 indeyets Exp $ */ +/* $Id: mbstring.c,v 1.280 2008/07/07 10:00:30 indeyets Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -2099,8 +2099,8 @@ { size_t argc = ZEND_NUM_ARGS(); char *str, *encoding; - long str_len, from, len, encoding_len; - int mblen; + long from, len; + int mblen, str_len, encoding_len; mbfl_string string, result, *ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sl|ls, str, str_len, from, len, encoding, encoding_len) == FAILURE) { @@ -2172,7 +2172,8 @@ { size_t argc = ZEND_NUM_ARGS(); char *str, *encoding; - long str_len, from, len, encoding_len; + long from, len; + int str_len, encoding_len; mbfl_string string, result, *ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sl|ls, str, str_len, from, len, encoding, encoding_len) == FAILURE) { @@ -2276,7 +2277,8 @@ { zval **arg1, **arg2, **arg3, **arg4, **arg5; char *str, *trimmarker, *encoding; - long str_len, from, width, trimmarker_len, encoding_len; + long from, width; + int str_len, trimmarker_len, encoding_len; mbfl_string string, result, marker, *ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, sll|ss, str, str_len, from, width, trimmarker, trimmarker_len, encoding, encoding_len) == FAILURE) { @@ -2419,7 +2421,7 @@ PHP_FUNCTION(mb_convert_encoding) { char *arg_str, *arg_new; - long str_len, new_len; + int str_len, new_len; zval *arg_old; int i; size_t size, l, n; @@ -2562,7 +2564,7 @@ PHP_FUNCTION(mb_detect_encoding) { char *str; - long str_len; + int str_len; zend_bool strict=0; zval *encoding_list; @@ -3202,7 +3204,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) { char *str, *encoding; - long str_len, encoding_len; + int str_len, encoding_len; zval *zconvmap, **hash_entry; HashTable *target_hash; size_t argc = ZEND_NUM_ARGS(); -- 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/posix/tests posix_strerror_error.phpt posix_strerror_variation1.phpt
indeyetsFri Jul 4 14:30:36 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/posix/testsposix_strerror_error.phpt posix_strerror_variation1.phpt Log: fixed tests not to rely on actual strings of errors, as those are not defined by any standard and are platform-dependent http://cvs.php.net/viewvc.cgi/php-src/ext/posix/tests/posix_strerror_error.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/posix/tests/posix_strerror_error.phpt diff -u php-src/ext/posix/tests/posix_strerror_error.phpt:1.1.4.3 php-src/ext/posix/tests/posix_strerror_error.phpt:1.1.4.4 --- php-src/ext/posix/tests/posix_strerror_error.phpt:1.1.4.3 Fri Apr 11 11:05:56 2008 +++ php-src/ext/posix/tests/posix_strerror_error.phpt Fri Jul 4 14:30:36 2008 @@ -24,7 +24,7 @@ echo \n-- Testing posix_strerror() function with invalid error number --\n; $errno = -999; -var_dump( posix_strerror($errno) ); +echo gettype( posix_strerror($errno) ).\n; echo Done; ? @@ -42,5 +42,5 @@ bool(false) -- Testing posix_strerror() function with invalid error number -- -string(%d) Unknown error %d +string Done http://cvs.php.net/viewvc.cgi/php-src/ext/posix/tests/posix_strerror_variation1.phpt?r1=1.1.4.3r2=1.1.4.4diff_format=u Index: php-src/ext/posix/tests/posix_strerror_variation1.phpt diff -u php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.1.4.3 php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.1.4.4 --- php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.1.4.3 Fri Apr 11 11:05:56 2008 +++ php-src/ext/posix/tests/posix_strerror_variation1.phpt Fri Jul 4 14:30:36 2008 @@ -73,7 +73,7 @@ foreach($values as $value) { echo \nArg value $value \n; - var_dump( posix_strerror($value) ); + echo gettype( posix_strerror($value) ).\n; }; echo Done; @@ -86,87 +86,87 @@ Notice: Undefined variable: unset_var in %s on line %d Arg value 10.5 -string(18) No child processes +string Arg value -10.5 -string(%d) Unknown error %d +string Arg value 101234567000 -string(%d) Unknown error %d +string Arg value 1.07654321E-9 -string(7) Success +string Arg value 0.5 -string(7) Success +string Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value -string(7) Success +string Arg value -string(7) Success +string Arg value 1 -string(23) Operation not permitted +string Arg value -string(7) Success +string Arg value 1 -string(23) Operation not permitted +string Arg value -string(7) Success +string Arg value Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d -bool(false) +boolean Arg value Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d -bool(false) +boolean Arg value string Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d -bool(false) +boolean Arg value string Warning: posix_strerror() expects parameter 1 to be long, string given in %s on line %d -bool(false) +boolean Arg value -string(7) Success +string Arg value -string(7) Success +string Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/posix/tests posix_strerror_error.phpt posix_strerror_variation1.phpt
indeyetsFri Jul 4 14:56:30 2008 UTC Modified files: /php-src/ext/posix/testsposix_strerror_error.phpt posix_strerror_variation1.phpt Log: MFB: fixed tests not to rely on actual strings of errors, as those are not defined by any standard and are platform-dependent http://cvs.php.net/viewvc.cgi/php-src/ext/posix/tests/posix_strerror_error.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/posix/tests/posix_strerror_error.phpt diff -u php-src/ext/posix/tests/posix_strerror_error.phpt:1.3 php-src/ext/posix/tests/posix_strerror_error.phpt:1.4 --- php-src/ext/posix/tests/posix_strerror_error.phpt:1.3 Fri Apr 11 11:05:33 2008 +++ php-src/ext/posix/tests/posix_strerror_error.phpt Fri Jul 4 14:56:30 2008 @@ -24,7 +24,7 @@ echo \n-- Testing posix_strerror() function with invalid error number --\n; $errno = -999; -var_dump( posix_strerror($errno) ); +echo gettype( posix_strerror($errno) ).\n; echo Done; ? @@ -42,5 +42,5 @@ bool(false) -- Testing posix_strerror() function with invalid error number -- -string(%d) Unknown error %d +string Done http://cvs.php.net/viewvc.cgi/php-src/ext/posix/tests/posix_strerror_variation1.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/posix/tests/posix_strerror_variation1.phpt diff -u php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.5 php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.6 --- php-src/ext/posix/tests/posix_strerror_variation1.phpt:1.5 Tue May 27 12:17:39 2008 +++ php-src/ext/posix/tests/posix_strerror_variation1.phpt Fri Jul 4 14:56:30 2008 @@ -73,7 +73,7 @@ foreach($values as $value) { echo \nArg value $value \n; - var_dump( posix_strerror($value) ); + echo gettype( posix_strerror($value) ).\n; }; echo Done; @@ -86,97 +86,97 @@ Notice: Undefined variable: unset_var in %s on line %d Arg value 10.5 -string(18) No child processes +string Arg value -10.5 -string(%d) Unknown error %d +string Arg value 101234567000 -string(%d) Unknown error %d +string Arg value 1.07654321E-9 -string(7) Success +string Arg value 0.5 -string(7) Success +string Notice: Array to string conversion in %s on line %d Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Notice: Array to string conversion in %s on line %d Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Notice: Array to string conversion in %s on line %d Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Notice: Array to string conversion in %s on line %d Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Notice: Array to string conversion in %s on line %d Arg value Array Warning: posix_strerror() expects parameter 1 to be long, array given in %s on line %d -bool(false) +boolean Arg value -string(7) Success +string Arg value -string(7) Success +string Arg value 1 -string(23) Operation not permitted +string Arg value -string(7) Success +string Arg value 1 -string(23) Operation not permitted +string Arg value -string(7) Success +string Arg value Warning: posix_strerror() expects parameter 1 to be long, Unicode string given in %s on line %d -bool(false) +boolean Arg value Warning: posix_strerror() expects parameter 1 to be long, Unicode string given in %s on line %d -bool(false) +boolean Arg value string Warning: posix_strerror() expects parameter 1 to be long, Unicode string given in %s on line %d -bool(false) +boolean Arg value string Warning: posix_strerror() expects parameter 1 to be long, Unicode string given in %s on line %d -bool(false) +boolean Arg value -string(7) Success +string Arg value -string(7) Success +string Catchable fatal error: Object of class stdClass could not be converted to string in %s on line %d -- 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) /sapi/apache php_apache.c
indeyetsSat Jun 28 09:52:03 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/apachephp_apache.c Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/php_apache.c?r1=1.89.2.4.2.6.2.2r2=1.89.2.4.2.6.2.3diff_format=u Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.89.2.4.2.6.2.2 php-src/sapi/apache/php_apache.c:1.89.2.4.2.6.2.3 --- php-src/sapi/apache/php_apache.c:1.89.2.4.2.6.2.2 Mon Dec 31 07:17:18 2007 +++ php-src/sapi/apache/php_apache.cSat Jun 28 09:52:03 2008 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.89.2.4.2.6.2.2 2007/12/31 07:17:18 sebastian Exp $ */ +/* $Id: php_apache.c,v 1.89.2.4.2.6.2.3 2008/06/28 09:52:03 indeyets Exp $ */ #include php_apache_http.h @@ -141,28 +141,26 @@ Get and set Apache request notes */ PHP_FUNCTION(apache_note) { - zval **arg_name, **arg_val; - char *note_val; + char *note_name, *note_val; + long note_name_len, note_val_len; + char *old_val; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, arg_name, arg_val) ==FAILURE ) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - - convert_to_string_ex(arg_name); - note_val = (char *) table_get(((request_rec *)SG(server_context))-notes, (*arg_name)-value.str.val); - + + old_val = (char *) table_get(((request_rec *)SG(server_context))-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(arg_val); - table_set(((request_rec *)SG(server_context))-notes, (*arg_name)-value.str.val, (*arg_val)-value.str.val); + table_set(((request_rec *)SG(server_context))-notes, note_name, note_val); } - if (note_val) { - RETURN_STRING(note_val, 1); - } else { - RETURN_FALSE; + if (old_val) { + RETURN_STRING(old_val, 1); } + + RETURN_FALSE; } /* }}} */ @@ -310,23 +308,25 @@ */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + long filename_len; request_rec *rr = NULL; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - if (!(rr = sub_req_lookup_uri ((*filename)-value.str.val, ((request_rec *) SG(server_context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, (*filename)-value.str.val); - if (rr) destroy_sub_req (rr); + if (!(rr = sub_req_lookup_uri (filename, ((request_rec *) SG(server_context) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); + if (rr) + destroy_sub_req (rr); RETURN_FALSE; } if (rr-status != 200) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, (*filename)-value.str.val); - if (rr) destroy_sub_req (rr); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); + if (rr) + destroy_sub_req (rr); RETURN_FALSE; } @@ -334,13 +334,16 @@ php_header(TSRMLS_C); if (run_sub_req(rr)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, (*filename)-value.str.val); - if (rr) destroy_sub_req (rr); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - request execution failed, filename); + if (rr) + destroy_sub_req (rr); RETURN_FALSE; - } else { - if (rr) destroy_sub_req (rr); - RETURN_TRUE; } + + if (rr) + destroy_sub_req (rr); + + RETURN_TRUE; } /* }}} */ @@ -351,14 +354,14 @@ Fetch all HTTP request headers */ PHP_FUNCTION(apache_request_headers) { -array_header *env_arr; -table_entry *tenv; -int i; - -array_init(return_value); -env_arr = table_elts(((request_rec *) SG(server_context))-headers_in); -tenv = (table_entry *)env_arr-elts; -for (i = 0; i env_arr-nelts; ++i) { + array_header *env_arr; +
[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/apache mod_php5.c
indeyetsSat Jun 28 10:01:18 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/apachemod_php5.c Log: fixed types (no more compiler warnings) http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r1=1.19.2.7.2.13.2.6r2=1.19.2.7.2.13.2.7diff_format=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.19.2.7.2.13.2.6 php-src/sapi/apache/mod_php5.c:1.19.2.7.2.13.2.7 --- php-src/sapi/apache/mod_php5.c:1.19.2.7.2.13.2.6Sun Jun 1 16:08:52 2008 +++ php-src/sapi/apache/mod_php5.c Sat Jun 28 10:01:17 2008 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php5.c,v 1.19.2.7.2.13.2.6 2008/06/01 16:08:52 scottmac Exp $ */ +/* $Id: mod_php5.c,v 1.19.2.7.2.13.2.7 2008/06/28 10:01:17 indeyets Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -243,7 +243,7 @@ table_entry *elts = (table_entry *) arr-elts; zval **path_translated; HashTable *symbol_table; - int new_val_len; + unsigned int new_val_len; for (i = 0; i arr-nelts; i++) { char *val; @@ -683,7 +683,7 @@ TSRMLS_FETCH(); ap_table_setn(r-notes, mod_php_memory_usage, - ap_psprintf(r-pool, %u, zend_memory_peak_usage(1 TSRMLS_CC))); + ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC))); return result; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/apache mod_php.c php_apache.c
indeyetsSat Jun 28 10:16:25 2008 UTC Modified files: /php-src/sapi/apachemod_php.c php_apache.c Log: updated to the new parameter-parsing api (port from 5.3) http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php.c?r1=1.8r2=1.9diff_format=u Index: php-src/sapi/apache/mod_php.c diff -u php-src/sapi/apache/mod_php.c:1.8 php-src/sapi/apache/mod_php.c:1.9 --- php-src/sapi/apache/mod_php.c:1.8 Sun Jun 1 16:10:46 2008 +++ php-src/sapi/apache/mod_php.c Sat Jun 28 10:16:24 2008 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php.c,v 1.8 2008/06/01 16:10:46 scottmac Exp $ */ +/* $Id: mod_php.c,v 1.9 2008/06/28 10:16:24 indeyets Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -243,7 +243,7 @@ table_entry *elts = (table_entry *) arr-elts; zval **path_translated; HashTable *symbol_table; - int new_val_len; + unsigned int new_val_len; for (i = 0; i arr-nelts; i++) { char *val; @@ -676,7 +676,7 @@ TSRMLS_FETCH(); ap_table_setn(r-notes, mod_php_memory_usage, - ap_psprintf(r-pool, %u, zend_memory_peak_usage(1 TSRMLS_CC))); + ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC))); return result; } http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/php_apache.c?r1=1.103r2=1.104diff_format=u Index: php-src/sapi/apache/php_apache.c diff -u php-src/sapi/apache/php_apache.c:1.103 php-src/sapi/apache/php_apache.c:1.104 --- php-src/sapi/apache/php_apache.c:1.103 Mon Dec 31 07:12:19 2007 +++ php-src/sapi/apache/php_apache.cSat Jun 28 10:16:25 2008 @@ -17,7 +17,7 @@ | David Sklar [EMAIL PROTECTED] | +--+ */ -/* $Id: php_apache.c,v 1.103 2007/12/31 07:12:19 sebastian Exp $ */ +/* $Id: php_apache.c,v 1.104 2008/06/28 10:16:25 indeyets Exp $ */ #include php_apache_http.h @@ -141,28 +141,26 @@ Get and set Apache request notes */ PHP_FUNCTION(apache_note) { - zval **arg_name, **arg_val; - char *note_val; + char *note_name, *note_val; + long note_name_len, note_val_len; + char *old_val; int arg_count = ZEND_NUM_ARGS(); - if (arg_count1 || arg_count2 || - zend_get_parameters_ex(arg_count, arg_name, arg_val) ==FAILURE ) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(arg_count TSRMLS_CC, s|s, note_name, note_name_len, note_val, note_val_len) == FAILURE) { + return; } - - convert_to_string_ex(arg_name); - note_val = (char *) table_get(((request_rec *)SG(server_context))-notes, (*arg_name)-value.str.val); - + + old_val = (char *) table_get(((request_rec *)SG(server_context))-notes, note_name); + if (arg_count == 2) { - convert_to_string_ex(arg_val); - table_set(((request_rec *)SG(server_context))-notes, (*arg_name)-value.str.val, (*arg_val)-value.str.val); + table_set(((request_rec *)SG(server_context))-notes, note_name, note_val); } - if (note_val) { - RETURN_STRING(note_val, 1); - } else { - RETURN_FALSE; + if (old_val) { + RETURN_STRING(old_val, 1); } + + RETURN_FALSE; } /* }}} */ @@ -310,23 +308,25 @@ */ PHP_FUNCTION(virtual) { - zval **filename; + char *filename; + long filename_len; request_rec *rr = NULL; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, filename) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, filename, filename_len) == FAILURE) { + return; } - convert_to_string_ex(filename); - if (!(rr = sub_req_lookup_uri ((*filename)-value.str.val, ((request_rec *) SG(server_context) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, (*filename)-value.str.val); - if (rr) destroy_sub_req (rr); + if (!(rr = sub_req_lookup_uri (filename, ((request_rec *) SG(server_context) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - URI lookup failed, filename); + if (rr) + destroy_sub_req (rr); RETURN_FALSE; } if (rr-status != 200) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, (*filename)-value.str.val); - if (rr) destroy_sub_req (rr); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to include '%s' - error finding URI, filename); +
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/mbstring mbstring.c php_mbregex.h
indeyetsSat Jun 28 18:04:19 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mbstring mbstring.c php_mbregex.h Log: added arginfo (fixes #45388) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.8r2=1.224.2.22.2.25.2.9diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.8 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.9 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.8 Fri Jun 13 14:48:33 2008 +++ php-src/ext/mbstring/mbstring.c Sat Jun 28 18:04:19 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.25.2.8 2008/06/13 14:48:33 hirokawa Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.25.2.9 2008/06/28 18:04:19 indeyets Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -167,6 +167,26 @@ ZEND_ARG_PASS_INFO(0) ZEND_END_ARG_INFO() +static + ZEND_BEGIN_ARG_INFO_EX(mb_parse_str_arginfo, 0, 0, 1) + ZEND_ARG_INFO(0, encoded_string) + ZEND_ARG_ARRAY_INFO(1, result, 1) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO_EX(mb_convert_variables_arginfo, 1, 0, 3) + ZEND_ARG_INFO(0, to_encoding) + ZEND_ARG_INFO(0, from_encoding) + ZEND_ARG_INFO(1, vars) + ZEND_END_ARG_INFO() + +static + ZEND_BEGIN_ARG_INFO_EX(mb_ereg_arginfo, 0, 0, 2) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(1, regs) + ZEND_END_ARG_INFO() + /* {{{ mb_overload_def mb_ovld[] */ static const struct mb_overload_def mb_ovld[] = { {MB_OVERLOAD_MAIL, mail, mb_send_mail, mb_orig_mail}, @@ -204,7 +224,7 @@ PHP_FE(mb_http_output, NULL) PHP_FE(mb_detect_order, NULL) PHP_FE(mb_substitute_character, NULL) - PHP_FE(mb_parse_str,second_arg_force_ref) + PHP_FE(mb_parse_str,mb_parse_str_arginfo) PHP_FE(mb_output_handler, NULL) PHP_FE(mb_preferred_mime_name, NULL) PHP_FE(mb_strlen, NULL) @@ -227,7 +247,7 @@ PHP_FE(mb_convert_kana, NULL) PHP_FE(mb_encode_mimeheader,NULL) PHP_FE(mb_decode_mimeheader,NULL) - PHP_FE(mb_convert_variables,third_and_rest_force_ref) + PHP_FE(mb_convert_variables,mb_convert_variables_arginfo) PHP_FE(mb_encode_numericentity, NULL) PHP_FE(mb_decode_numericentity, NULL) PHP_FE(mb_send_mail,NULL) http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.h?r1=1.12.2.1.2.1.2.1r2=1.12.2.1.2.1.2.2diff_format=u Index: php-src/ext/mbstring/php_mbregex.h diff -u php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.1 php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.2 --- php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.1 Mon Dec 31 07:17:09 2007 +++ php-src/ext/mbstring/php_mbregex.h Sat Jun 28 18:04:19 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mbregex.h,v 1.12.2.1.2.1.2.1 2007/12/31 07:17:09 sebastian Exp $ */ +/* $Id: php_mbregex.h,v 1.12.2.1.2.1.2.2 2008/06/28 18:04:19 indeyets Exp $ */ #ifndef _PHP_MBREGEX_H #define _PHP_MBREGEX_H @@ -45,8 +45,8 @@ #define PHP_MBREGEX_FUNCTION_ENTRIES \ PHP_FE(mb_regex_encoding, NULL) \ PHP_FE(mb_regex_set_options,NULL) \ - PHP_FE(mb_ereg, third_arg_force_ref) \ - PHP_FE(mb_eregi,third_arg_force_ref) \ + PHP_FE(mb_ereg, mb_ereg_arginfo) \ + PHP_FE(mb_eregi,mb_ereg_arginfo) \ PHP_FE(mb_ereg_replace, NULL) \ PHP_FE(mb_eregi_replace,NULL) \ PHP_FE(mb_split,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/mbstring mbstring.c php_mbregex.c /ext/mbstring/tests mb_ereg2.phpt mb_regex_encoding_error1.phpt mb_regex_encoding_variation1.phpt mb_substr_error1.phpt mb_subst
indeyetsSat Jun 28 21:23:08 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mbstring mbstring.c php_mbregex.c /php-src/ext/mbstring/tests mb_ereg2.phpt mb_regex_encoding_error1.phpt mb_regex_encoding_variation1.phpt mb_substr_error1.phpt mb_substr_variation1.phpt mb_substr_variation2.phpt Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.9r2=1.224.2.22.2.25.2.10diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.9 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.10 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.9 Sat Jun 28 18:04:19 2008 +++ php-src/ext/mbstring/mbstring.c Sat Jun 28 21:23:07 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.25.2.9 2008/06/28 18:04:19 indeyets Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.25.2.10 2008/06/28 21:23:07 indeyets Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -1293,12 +1293,17 @@ Sets the current detect_order or Return the current detect_order as a array */ PHP_FUNCTION(mb_detect_order) { - zval **arg1; + size_t argc = ZEND_NUM_ARGS(); + zval *arg1; int n, size; enum mbfl_no_encoding *list, *entry; char *name; - if (ZEND_NUM_ARGS() == 0) { + if (zend_parse_parameters(argc TSRMLS_CC, |z, arg1) == FAILURE) { + return; + } + + if (argc == 0) { array_init(return_value); entry = MBSTRG(current_detect_order_list); n = MBSTRG(current_detect_order_list_size); @@ -1310,12 +1315,12 @@ entry++; n--; } - } else if (ZEND_NUM_ARGS() == 1 zend_get_parameters_ex(1, arg1) != FAILURE) { + } else { list = NULL; size = 0; - switch (Z_TYPE_PP(arg1)) { + switch (Z_TYPE_P(arg1)) { case IS_ARRAY: - if (!php_mb_parse_encoding_array(*arg1, list, size, 0 TSRMLS_CC)) { + if (!php_mb_parse_encoding_array(arg1, list, size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1323,8 +1328,8 @@ } break; default: - convert_to_string_ex(arg1); - if (!php_mb_parse_encoding_list(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1), list, size, 0 TSRMLS_CC)) { + convert_to_string_ex(arg1); + if (!php_mb_parse_encoding_list(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), list, size, 0 TSRMLS_CC)) { if (list) { efree(list); } @@ -1332,18 +1337,17 @@ } break; } + if (list == NULL) { - RETVAL_FALSE; - } else { - if (MBSTRG(current_detect_order_list)) { - efree(MBSTRG(current_detect_order_list)); - } - MBSTRG(current_detect_order_list) = list; - MBSTRG(current_detect_order_list_size) = size; - RETVAL_TRUE; + RETURN_FALSE; } - } else { - WRONG_PARAM_COUNT; + + if (MBSTRG(current_detect_order_list)) { + efree(MBSTRG(current_detect_order_list)); + } + MBSTRG(current_detect_order_list) = list; + MBSTRG(current_detect_order_list_size) = size; + RETURN_TRUE; } } /* }}} */ @@ -1352,52 +1356,56 @@ Sets the current substitute_character or returns the current substitute_character */ PHP_FUNCTION(mb_substitute_character) { - zval **arg1; + zval *arg1; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |z, arg1) == FAILURE) { + return; + } if (ZEND_NUM_ARGS() == 0) { if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { - RETVAL_STRING(none, 1); + RETURN_STRING(none, 1); } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { - RETVAL_STRING(long, 1); + RETURN_STRING(long, 1); } else if (MBSTRG(current_filter_illegal_mode)
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/bz2 bz2.c /ext/bz2/tests 001.phpt 002.phpt 005.phpt
indeyetsSun Jun 22 12:03:30 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/bz2bz2.c /php-src/ext/bz2/tests 001.phpt 002.phpt 005.phpt Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.12.2.2r2=1.14.2.3.2.12.2.3diff_format=u Index: php-src/ext/bz2/bz2.c diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.2 php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.3 --- php-src/ext/bz2/bz2.c:1.14.2.3.2.12.2.2 Mon Dec 31 07:17:06 2007 +++ php-src/ext/bz2/bz2.c Sun Jun 22 12:03:30 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: bz2.c,v 1.14.2.3.2.12.2.2 2007/12/31 07:17:06 sebastian Exp $ */ +/* $Id: bz2.c,v 1.14.2.3.2.12.2.3 2008/06/22 12:03:30 indeyets Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -364,23 +364,24 @@ Opens a new BZip2 stream */ static PHP_FUNCTION(bzopen) { - zval**file, /* The file to open */ - **mode; /* The mode to open the stream with */ + zval**file; /* The file to open */ + char *mode; /* The mode to open the stream with */ + long mode_len; + BZFILE *bz; /* The compressed file stream */ php_stream *stream = NULL; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, file, mode) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Zs, file, mode, mode_len) == FAILURE) { + return; } - convert_to_string_ex(mode); - if (Z_STRLEN_PP(mode) != 1 || (Z_STRVAL_PP(mode)[0] != 'r' Z_STRVAL_PP(mode)[0] != 'w')) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, '%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported., Z_STRVAL_PP(mode)); + if (mode_len != 1 || (mode[0] != 'r' mode[0] != 'w')) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, '%s' is not a valid mode for bzopen(). Only 'w' and 'r' are supported., mode); RETURN_FALSE; } /* If it's not a resource its a string containing the filename to open */ - if (Z_TYPE_PP(file) != IS_RESOURCE) { + if (Z_TYPE_PP(file) == IS_STRING) { convert_to_string_ex(file); if (Z_STRLEN_PP(file) == 0) { @@ -390,10 +391,10 @@ stream = php_stream_bz2open(NULL, Z_STRVAL_PP(file), - Z_STRVAL_PP(mode), + mode, ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL); - } else { + } else if (Z_TYPE_PP(file) == IS_RESOURCE) { /* If it is a resource, than its a stream resource */ int fd; int stream_mode_len; @@ -409,17 +410,17 @@ RETURN_FALSE; } - switch(Z_STRVAL_PP(mode)[0]) { + switch(mode[0]) { case 'r': /* only r and rb are supported */ - if (stream-mode[0] != Z_STRVAL_PP(mode)[0] !(stream_mode_len == 2 stream-mode[1] != Z_STRVAL_PP(mode)[0])) { + if (stream-mode[0] != mode[0] !(stream_mode_len == 2 stream-mode[1] != mode[0])) { php_error_docref(NULL TSRMLS_CC, E_WARNING, cannot read from a stream opened in write only mode); RETURN_FALSE; } break; case 'w': /* support only w(b), a(b), x(b) */ - if (stream-mode[0] != Z_STRVAL_PP(mode)[0] !(stream_mode_len == 2 stream-mode[1] != Z_STRVAL_PP(mode)[0]) + if (stream-mode[0] != mode[0] !(stream_mode_len == 2 stream-mode[1] != mode[0]) stream-mode[0] != 'a' !(stream_mode_len == 2 stream-mode[1] != 'a') stream-mode[0] != 'x' !(stream_mode_len == 2 stream-mode[1] != 'x')) { php_error_docref(NULL TSRMLS_CC, E_WARNING, cannot write to a stream opened in read only mode); @@ -435,9 +436,12 @@ RETURN_FALSE; } - bz = BZ2_bzdopen(fd, Z_STRVAL_PP(mode)); + bz = BZ2_bzdopen(fd, mode); - stream = php_stream_bz2open_from_BZFILE(bz, Z_STRVAL_PP(mode), stream); + stream = php_stream_bz2open_from_BZFILE(bz, mode,
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/exif exif.c
indeyetsSun Jun 22 14:13:02 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/exif exif.c Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.173.2.5.2.20.2.5r2=1.173.2.5.2.20.2.6diff_format=u Index: php-src/ext/exif/exif.c diff -u php-src/ext/exif/exif.c:1.173.2.5.2.20.2.5 php-src/ext/exif/exif.c:1.173.2.5.2.20.2.6 --- php-src/ext/exif/exif.c:1.173.2.5.2.20.2.5 Wed Mar 12 17:32:01 2008 +++ php-src/ext/exif/exif.c Sun Jun 22 14:13:01 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: exif.c,v 1.173.2.5.2.20.2.5 2008/03/12 17:32:01 iliaa Exp $ */ +/* $Id: exif.c,v 1.173.2.5.2.20.2.6 2008/06/22 14:13:01 indeyets Exp $ */ /* ToDos * @@ -142,7 +142,7 @@ }; /* }}} */ -#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173.2.5.2.20.2.5 2008/03/12 17:32:01 iliaa Exp $ +#define EXIF_VERSION 1.4 $Id: exif.c,v 1.173.2.5.2.20.2.6 2008/06/22 14:13:01 indeyets Exp $ /* {{{ PHP_MINFO_FUNCTION */ @@ -2360,22 +2360,20 @@ Get headername for index or false if not defined */ PHP_FUNCTION(exif_tagname) { - zval **p_num; - int tag, ac = ZEND_NUM_ARGS(); + long tag; char *szTemp; - if ((ac 1 || ac 1) || zend_get_parameters_ex(ac, p_num) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, tag) == FAILURE) { + return; } - convert_to_long_ex(p_num); - tag = Z_LVAL_PP(p_num); szTemp = exif_get_tagname(tag, NULL, 0, tag_table_IFD TSRMLS_CC); - if (tag0 || !szTemp || !szTemp[0]) { - RETURN_BOOL(FALSE); - } else { - RETURN_STRING(szTemp, 1) + + if (tag 0 || !szTemp || !szTemp[0]) { + RETURN_FALSE; } + + RETURN_STRING(szTemp, 1) } /* }}} */ @@ -3914,30 +3912,31 @@ Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails */ PHP_FUNCTION(exif_read_data) { - zval **p_name, **p_sections_needed, **p_sub_arrays, **p_read_thumbnail, **p_read_all; - int i, ac = ZEND_NUM_ARGS(), ret, sections_needed=0, sub_arrays=0, read_thumbnail=0, read_all=0; + char *p_name, *p_sections_needed; + long p_name_len, p_sections_needed_len; + zend_bool sub_arrays=0, read_thumbnail=0, read_all=0; + + int i, ac = ZEND_NUM_ARGS(), ret, sections_needed=0; image_info_type ImageInfo; char tmp[64], *sections_str, *s; - memset(ImageInfo, 0, sizeof(ImageInfo)); - - if ((ac 1 || ac 4) || zend_get_parameters_ex(ac, p_name, p_sections_needed, p_sub_arrays, p_read_thumbnail, p_read_all) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ac TSRMLS_CC, s|sbb, p_name, p_name_len, p_sections_needed, p_sections_needed_len, sub_arrays, read_thumbnail) == FAILURE) { + return; } - convert_to_string_ex(p_name); + memset(ImageInfo, 0, sizeof(ImageInfo)); - if(ac = 2) { - convert_to_string_ex(p_sections_needed); - spprintf(sections_str, 0, ,%s,, Z_STRVAL_PP(p_sections_needed)); + if (ac = 2) { + spprintf(sections_str, 0, ,%s,, p_sections_needed); /* sections_str DOES start with , and SPACES are NOT allowed in names */ s = sections_str; - while(*++s) { - if(*s==' ') { + while (*++s) { + if (*s == ' ') { *s = ','; } } - for (i=0; iSECTION_COUNT; i++) { + + for (i = 0; i SECTION_COUNT; i++) { snprintf(tmp, sizeof(tmp), ,%s,, exif_get_sectionname(i)); if (strstr(sections_str, tmp)) { sections_needed |= 1i; @@ -3954,24 +3953,9 @@ EFREE_IF(sections_str); #endif } - if(ac = 3) { - convert_to_long_ex(p_sub_arrays); - sub_arrays = Z_LVAL_PP(p_sub_arrays); - } - if(ac = 4) { - convert_to_long_ex(p_read_thumbnail); - read_thumbnail = Z_LVAL_PP(p_read_thumbnail); - } - if(ac = 5) { - convert_to_long_ex(p_read_all); - read_all = Z_LVAL_PP(p_read_all); - } - /* parameters 3,4 will be working in later versions */ - read_all = 0; /* just to make function work for 4.2 tree */ - - ret = exif_read_file(ImageInfo, Z_STRVAL_PP(p_name), read_thumbnail, read_all TSRMLS_CC); - sections_str = exif_get_sectionlist(ImageInfo.sections_found TSRMLS_CC); + ret = exif_read_file(ImageInfo, p_name, read_thumbnail, read_all TSRMLS_CC); + sections_str = exif_get_sectionlist(ImageInfo.sections_found
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcntl pcntl.c
indeyetsSun Jun 22 15:16:11 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/pcntl pcntl.c Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/pcntl/pcntl.c?r1=1.48.2.2.2.4.2.3r2=1.48.2.2.2.4.2.4diff_format=u Index: php-src/ext/pcntl/pcntl.c diff -u php-src/ext/pcntl/pcntl.c:1.48.2.2.2.4.2.3 php-src/ext/pcntl/pcntl.c:1.48.2.2.2.4.2.4 --- php-src/ext/pcntl/pcntl.c:1.48.2.2.2.4.2.3 Mon Dec 31 07:17:11 2007 +++ php-src/ext/pcntl/pcntl.c Sun Jun 22 15:16:11 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pcntl.c,v 1.48.2.2.2.4.2.3 2007/12/31 07:17:11 sebastian Exp $ */ +/* $Id: pcntl.c,v 1.48.2.2.2.4.2.4 2008/06/22 15:16:11 indeyets Exp $ */ #define PCNTL_DEBUG 0 @@ -305,16 +305,14 @@ PHP_FUNCTION(pcntl_wifexited) { #ifdef WIFEXITED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFEXITED(status_word)) RETURN_TRUE; + + if (WIFEXITED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -325,16 +323,14 @@ PHP_FUNCTION(pcntl_wifstopped) { #ifdef WIFSTOPPED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFSTOPPED(status_word)) RETURN_TRUE; + + if (WIFSTOPPED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -345,16 +341,14 @@ PHP_FUNCTION(pcntl_wifsignaled) { #ifdef WIFSIGNALED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFSIGNALED(status_word)) RETURN_TRUE; + + if (WIFSIGNALED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -365,14 +359,11 @@ PHP_FUNCTION(pcntl_wexitstatus) { #ifdef WEXITSTATUS - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); /* WEXITSTATUS only returns 8 bits so we *MUST* cast this to signed char if you want to have valid negative exit codes */ @@ -388,15 +379,12 @@ PHP_FUNCTION(pcntl_wtermsig) { #ifdef WTERMSIG - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - + RETURN_LONG(WTERMSIG(status_word)); #else RETURN_FALSE; @@ -409,16 +397,13 @@ PHP_FUNCTION(pcntl_wstopsig) { #ifdef WSTOPSIG - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - RETURN_LONG(WSTOPSIG(status_word)); + RETURN_LONG(WSTOPSIG(status_word)); #else RETURN_FALSE; #endif @@ -439,10 +424,10 @@ char **current_arg, **pair; int pair_length; char *key; - int key_length; + uint key_length; char *path; int path_len; - long key_num; + ulong key_num; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|aa, path, path_len, args, envs) == FAILURE) { return; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit:
[PHP-CVS] cvs: php-src /ext/pcntl pcntl.c
indeyetsSun Jun 22 15:44:19 2008 UTC Modified files: /php-src/ext/pcntl pcntl.c Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/pcntl/pcntl.c?r1=1.60r2=1.61diff_format=u Index: php-src/ext/pcntl/pcntl.c diff -u php-src/ext/pcntl/pcntl.c:1.60 php-src/ext/pcntl/pcntl.c:1.61 --- php-src/ext/pcntl/pcntl.c:1.60 Mon Dec 31 07:12:12 2007 +++ php-src/ext/pcntl/pcntl.c Sun Jun 22 15:44:19 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pcntl.c,v 1.60 2007/12/31 07:12:12 sebastian Exp $ */ +/* $Id: pcntl.c,v 1.61 2008/06/22 15:44:19 indeyets Exp $ */ #define PCNTL_DEBUG 0 @@ -305,16 +305,14 @@ PHP_FUNCTION(pcntl_wifexited) { #ifdef WIFEXITED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFEXITED(status_word)) RETURN_TRUE; + + if (WIFEXITED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -325,16 +323,14 @@ PHP_FUNCTION(pcntl_wifstopped) { #ifdef WIFSTOPPED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFSTOPPED(status_word)) RETURN_TRUE; + + if (WIFSTOPPED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -345,16 +341,14 @@ PHP_FUNCTION(pcntl_wifsignaled) { #ifdef WIFSIGNALED - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - - if (WIFSIGNALED(status_word)) RETURN_TRUE; + + if (WIFSIGNALED(status_word)) + RETURN_TRUE; #endif RETURN_FALSE; } @@ -365,14 +359,11 @@ PHP_FUNCTION(pcntl_wexitstatus) { #ifdef WEXITSTATUS - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); /* WEXITSTATUS only returns 8 bits so we *MUST* cast this to signed char if you want to have valid negative exit codes */ @@ -388,15 +379,12 @@ PHP_FUNCTION(pcntl_wtermsig) { #ifdef WTERMSIG - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - + RETURN_LONG(WTERMSIG(status_word)); #else RETURN_FALSE; @@ -409,16 +397,13 @@ PHP_FUNCTION(pcntl_wstopsig) { #ifdef WSTOPSIG - zval **status; - int status_word; - - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(ZEND_NUM_ARGS(), status) == FAILURE) { - WRONG_PARAM_COUNT; + long status_word; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, status_word) == FAILURE) { + return; } - - status_word = (int) Z_LVAL_PP(status); - RETURN_LONG(WSTOPSIG(status_word)); + RETURN_LONG(WSTOPSIG(status_word)); #else RETURN_FALSE; #endif @@ -439,10 +424,10 @@ char **current_arg, **pair; int pair_length; char *key; - int key_length; + uint key_length; char *path; int path_len; - long key_num; + ulong key_num; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|aa, path, path_len, args, envs) == FAILURE) { return; -- 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/curl interface.c
indeyetsSat Jun 21 21:51:05 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/curl interface.c Log: updated to the new parameter-parsing api http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.9r2=1.62.2.14.2.27.2.10diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.9 php-src/ext/curl/interface.c:1.62.2.14.2.27.2.10 --- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.9 Thu Feb 7 02:08:45 2008 +++ php-src/ext/curl/interface.cSat Jun 21 21:51:05 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.27.2.9 2008/02/07 02:08:45 iliaa Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.27.2.10 2008/06/21 21:51:05 indeyets Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -1149,15 +1149,15 @@ Copy a cURL handle along with all of it's preferences */ PHP_FUNCTION(curl_copy_handle) { - zval **zid; + zval *zid; CURL *cp; php_curl *ch; php_curl *dupch; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, zid) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zid) == FAILURE) { + return; } - ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); cp = curl_easy_duphandle(ch-cp); if (!cp) { @@ -1609,18 +1609,17 @@ Set an option for a cURL transfer */ PHP_FUNCTION(curl_setopt) { - zval **zid, **zoption, **zvalue; + zval*zid, *zvalue; + longzoption; php_curl*ch; - if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, zid, zoption, zvalue) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rlz, zid, zoption, zvalue) == FAILURE) { + return; } - ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); - - convert_to_long_ex(zoption); + ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); - if (!_php_curl_setopt(ch, Z_LVAL_PP(zoption), zvalue, return_value TSRMLS_CC)) { + if (!_php_curl_setopt(ch, zoption, zvalue, return_value TSRMLS_CC)) { RETURN_TRUE; } else { RETURN_FALSE; @@ -1637,7 +1636,7 @@ longoption; HashPositionpos; char*string_key; - int str_key_len; + uintstr_key_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, za, zid, arr) == FAILURE) { RETURN_FALSE; @@ -1681,15 +1680,15 @@ Perform a cURL session */ PHP_FUNCTION(curl_exec) { - zval **zid; + zval *zid; php_curl *ch; CURLcodeerror; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, zid) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zid) == FAILURE) { + return; } - ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); _php_curl_cleanup_handle(ch); @@ -1723,16 +1722,16 @@ Get information regarding a specific transfer */ PHP_FUNCTION(curl_getinfo) { - zval **zid, - **zoption; + zval*zid; php_curl*ch; - int option, argc = ZEND_NUM_ARGS(); + int argc = ZEND_NUM_ARGS(); + long option; - if (argc 1 || argc 2 || zend_get_parameters_ex(argc, zid, zoption) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(argc TSRMLS_CC, r|l, zid, option) == FAILURE) { + return; } - ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); + ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if (argc 2) { char *s_code; @@ -1807,7 +1806,6 @@ CAAS(request_header, ch-header.str); } } else { - option = Z_LVAL_PP(zoption); switch (option) { case CURLINFO_PRIVATE: case CURLINFO_EFFECTIVE_URL: @@ -1872,14 +1870,14 @@ Return a string contain the last error for the current session */ PHP_FUNCTION(curl_error) { - zval **zid; + zval *zid; php_curl *ch; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, zid) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zid) == FAILURE) { +