[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri May 23 01:31:47 2008 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.3054r2=1.3055diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.3054 php-src/ChangeLog:1.3055 --- php-src/ChangeLog:1.3054Thu May 22 01:31:41 2008 +++ php-src/ChangeLog Fri May 23 01:31:46 2008 @@ -1,3 +1,62 @@ +2008-05-22 Kalle Sommer Nielsen [EMAIL PROTECTED] + +* ext/standard/config.w32: + Enable inet_pton() and inet_ntop() on Windows in HEAD + +* (PHP_5_3) + NEWS + ext/standard/config.w32: + [DOC] enable inet_pton() and inet_ntop() on Windows + +2008-05-22 Robin Fernandes [EMAIL PROTECTED] + +* ext/reflection/tests/reflectionClass_getModifiers_basic.phpt + ext/reflection/tests/reflectionClass_getParentClass.phpt + ext/reflection/tests/reflectionClass_hasConstant_basic.phpt + ext/reflection/tests/reflectionClass_hasMethod_basic.phpt + ext/reflection/tests/reflectionClass_hasProperty_basic.phpt + ext/reflection/tests/reflectionClass_isInterface_basic.phpt + ext/reflection/tests/reflectionClass_isIterateable_basic.phpt + ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt: + Basic ReflectionClass tests (from Dutch TestFest) + +* ext/reflection/tests/reflectionClass_getModifiers_basic.phpt + ext/reflection/tests/reflectionClass_getModifiers_basic.phpt + ext/reflection/tests/reflectionClass_getParentClass.phpt + ext/reflection/tests/reflectionClass_getParentClass.phpt + ext/reflection/tests/reflectionClass_hasConstant_basic.phpt + ext/reflection/tests/reflectionClass_hasConstant_basic.phpt + ext/reflection/tests/reflectionClass_hasMethod_basic.phpt + ext/reflection/tests/reflectionClass_hasMethod_basic.phpt + ext/reflection/tests/reflectionClass_hasProperty_basic.phpt + ext/reflection/tests/reflectionClass_hasProperty_basic.phpt + ext/reflection/tests/reflectionClass_isInterface_basic.phpt + ext/reflection/tests/reflectionClass_isInterface_basic.phpt + ext/reflection/tests/reflectionClass_isIterateable_basic.phpt + ext/reflection/tests/reflectionClass_isIterateable_basic.phpt + ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt + ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt: + + file reflectionClass_getModifiers_basic.phpt was initially added on branch + PHP_5_3. + +2008-05-22 Greg Beaver [EMAIL PROTECTED] + +* (PHP_5_3) + ext/phar/phar.c + ext/phar/phar_object.c + ext/phar/tar.c + ext/phar/util.c + ext/phar/zip.c: + major fixes + * found felipe's segfault in util.c and fixed the segfault (3 tests fail + due to odd behavior of . and .. on this machine) + * fixed serious flaws in the setting/resetting of is_data - now it works + properly. Assume + all new PharData are tar-based, and allow passing Phar::ZIP to PharData + constructor to override this + * fix broken earlier commit, introduced segfault that broke 20 tests here + 2008-05-21 Felipe Pena [EMAIL PROTECTED] * (PHP_5_3)
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/phar phar.c phar_object.c tar.c util.c zip.c
cellog Thu May 22 06:33:09 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar.c phar_object.c tar.c util.c zip.c Log: major fixes * found felipe's segfault in util.c and fixed the segfault (3 tests fail due to odd behavior of . and .. on this machine) * fixed serious flaws in the setting/resetting of is_data - now it works properly. Assume all new PharData are tar-based, and allow passing Phar::ZIP to PharData constructor to override this * fix broken earlier commit, introduced segfault that broke 20 tests here http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.4r2=1.370.2.5diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.4 php-src/ext/phar/phar.c:1.370.2.5 --- php-src/ext/phar/phar.c:1.370.2.4 Wed May 21 22:00:43 2008 +++ php-src/ext/phar/phar.c Thu May 22 06:33:08 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar.c,v 1.370.2.4 2008/05/21 22:00:43 cellog Exp $ */ +/* $Id: phar.c,v 1.370.2.5 2008/05/22 06:33:08 cellog Exp $ */ #define PHAR_MAIN 1 #include phar_internal.h @@ -406,7 +406,6 @@ } } } - phar-is_data = is_data (phar-is_tar || phar-is_zip); if (pphar) { *pphar = phar; } @@ -1033,12 +1032,12 @@ } if (ext_len 3 (z = memchr(ext_str, 'z', ext_len)) ((ext_str + ext_len) - z = 2) !memcmp(z + 1, ip, 2)) { - // assume zip-based phar + /* assume zip-based phar */ return phar_open_or_create_zip(fname, fname_len, alias, alias_len, is_data, options, pphar, error TSRMLS_CC); } if (ext_len 3 (z = memchr(ext_str, 't', ext_len)) ((ext_str + ext_len) - z = 2) !memcmp(z + 1, ar, 2)) { - // assume tar-based phar + /* assume tar-based phar */ return phar_open_or_create_tar(fname, fname_len, alias, alias_len, is_data, options, pphar, error TSRMLS_CC); } @@ -1140,6 +1139,9 @@ if (is_data) { alias = NULL; alias_len = 0; + mydata-is_data = 1; + /* assume tar format, PharData can specify other */ + mydata-is_tar = 1; } else { phar_archive_data **fd_ptr; @@ -3025,7 +3027,7 @@ php_info_print_table_header(2, Phar: PHP Archive support, enabled); php_info_print_table_row(2, Phar EXT version, PHP_PHAR_VERSION); php_info_print_table_row(2, Phar API version, PHP_PHAR_API_VERSION); - php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.4 $); + php_info_print_table_row(2, CVS revision, $Revision: 1.370.2.5 $); php_info_print_table_row(2, Phar-based phar archives, enabled); php_info_print_table_row(2, Tar-based phar archives, enabled); php_info_print_table_row(2, ZIP-based phar archives, enabled); http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_object.c?r1=1.266.2.10r2=1.266.2.11diff_format=u Index: php-src/ext/phar/phar_object.c diff -u php-src/ext/phar/phar_object.c:1.266.2.10 php-src/ext/phar/phar_object.c:1.266.2.11 --- php-src/ext/phar/phar_object.c:1.266.2.10 Wed May 21 22:52:30 2008 +++ php-src/ext/phar/phar_object.c Thu May 22 06:33:09 2008 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: phar_object.c,v 1.266.2.10 2008/05/21 22:52:30 felipe Exp $ */ +/* $Id: phar_object.c,v 1.266.2.11 2008/05/22 06:33:09 cellog Exp $ */ #include phar_internal.h #include func_interceptors.h @@ -1102,7 +1102,7 @@ /* {{{ proto void Phar::__construct(string fname [, int flags [, string alias]]) * Construct a Phar archive object - * {{{ proto void PharData::__construct(string fname [, int flags [, string alias]]) + * {{{ proto void PharData::__construct(string fname [[, int flags [, string alias]], int file format = Phar::TAR]) * Construct a PharData archive object */ PHP_METHOD(Phar, __construct) @@ -1112,22 +1112,13 @@ #else char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname, *objname; int fname_len, alias_len = 0, arch_len, entry_len, is_data; - long flags = 0; + long flags = 0, format = 0; phar_archive_object *phar_obj; phar_archive_data *phar_data; zval *zobj = getThis(), arg1, arg2; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|ls!, fname, fname_len, flags, alias, alias_len) == FAILURE) { - return; - } - phar_obj = (phar_archive_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (phar_obj-arc.archive) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, Cannot call constructor twice); - return; -
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection/tests reflectionClass_getModifiers_basic.phpt reflectionClass_getParentClass.phpt reflectionClass_hasConstant_basic.phpt reflectionClass_hasMethod_basic
robinf Thu May 22 21:53:59 2008 UTC Added files: (Branch: PHP_5_3) /php-src/ext/reflection/tests reflectionClass_isIterateable_variation1.phpt reflectionClass_hasMethod_basic.phpt reflectionClass_isInterface_basic.phpt reflectionClass_hasProperty_basic.phpt reflectionClass_hasConstant_basic.phpt reflectionClass_getParentClass.phpt reflectionClass_getModifiers_basic.phpt reflectionClass_isIterateable_basic.phpt Log: Basic ReflectionClass tests (from Dutch TestFest) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt +++ php-src/ext/reflection/tests/reflectionClass_isIterateable_variation1.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_hasProperty_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_hasProperty_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_hasProperty_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_hasConstant_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_hasConstant_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_hasConstant_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_getParentClass.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_getParentClass.phpt +++ php-src/ext/reflection/tests/reflectionClass_getParentClass.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt?view=markuprev=1.1 Index: php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt +++ php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/reflection/tests reflectionClass_getModifiers_basic.phpt reflectionClass_getParentClass.phpt reflectionClass_hasConstant_basic.phpt reflectionClass_hasMethod_basic.phpt ref
robinf Thu May 22 21:54:01 2008 UTC Modified files: /php-src/ext/reflection/tests reflectionClass_isInterface_basic.phpt reflectionClass_hasMethod_basic.phpt reflectionClass_isIterateable_basic.phpt reflectionClass_getParentClass.phpt reflectionClass_hasProperty_basic.phpt reflectionClass_getModifiers_basic.phpt reflectionClass_isIterateable_variation1.phpt reflectionClass_hasConstant_basic.phpt Log: Basic ReflectionClass tests (from Dutch TestFest) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt:1.2 --- /dev/null Thu May 22 21:54:01 2008 +++ php-src/ext/reflection/tests/reflectionClass_isInterface_basic.phpt Thu May 22 21:54:01 2008 @@ -0,0 +1,27 @@ +--TEST-- +ReflectionClass::isInterface() method +--SKIPIF-- +?php extension_loaded('reflection') or die('skip'); ? +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED] +#testfest roosendaal on 2008-05-10 +--FILE-- +?php + +interface TestInterface {} +class TestClass {} +interface DerivedInterface extends TestInterface {} + +$reflectionClass = new ReflectionClass('TestInterface'); +$reflectionClass2 = new ReflectionClass('TestClass'); +$reflectionClass3 = new ReflectionClass('DerivedInterface'); + +var_dump($reflectionClass-isInterface()); +var_dump($reflectionClass2-isInterface()); +var_dump($reflectionClass3-isInterface()); + +? +--EXPECT-- +bool(true) +bool(false) +bool(true) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt:1.2 --- /dev/null Thu May 22 21:54:01 2008 +++ php-src/ext/reflection/tests/reflectionClass_hasMethod_basic.phpt Thu May 22 21:54:01 2008 @@ -0,0 +1,57 @@ +--TEST-- +ReflectionClass::hasMethod() +--CREDIT-- +Marc Veldman [EMAIL PROTECTED] +#testfest roosendaal on 2008-05-10 +--FILE-- +?php +//New instance of class C - defined below +$rc = new ReflectionClass(C); + +//Check if C has public method publicFoo +var_dump($rc-hasMethod('publicFoo')); + +//Check if C has protected method protectedFoo +var_dump($rc-hasMethod('protectedFoo')); + +//Check if C has private method privateFoo +var_dump($rc-hasMethod('privateFoo')); + +//Check if C has static method staticFoo +var_dump($rc-hasMethod('staticFoo')); + +//C should not have method bar +var_dump($rc-hasMethod('bar')); + +//Method names are case insensitive +var_dump($rc-hasMethod('PUBLICfOO')); + +Class C { + public function publicFoo() + { +return true; + } + + protected function protectedFoo() + { +return true; + } + + private function privateFoo() + { +return true; + } + + static function staticFoo() + { +return true; + } +} +? +--EXPECTF-- +bool(true) +bool(true) +bool(true) +bool(true) +bool(false) +bool(true) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt diff -u /dev/null php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt:1.2 --- /dev/null Thu May 22 21:54:01 2008 +++ php-src/ext/reflection/tests/reflectionClass_isIterateable_basic.phpt Thu May 22 21:54:01 2008 @@ -0,0 +1,36 @@ +--TEST-- +ReflectionClass::isIterateable() basic +--SKIPIF-- +?php extension_loaded('reflection') or die('skip'); ? +--CREDITS-- +Felix De Vliegher [EMAIL PROTECTED], Marc Veldman [EMAIL PROTECTED] +--FILE-- +?php + +class IteratorClass implements Iterator { + public function __construct() { } + public function key() {} + public function current() {} + function next() {} + function valid() {} + function rewind() {} +} +class DerivedClass extends IteratorClass {} +class NonIterator {} + +function dump_iterateable($class) { + $reflection = new ReflectionClass($class); + var_dump($reflection-isIterateable()); +} + +$classes = array(ArrayObject, IteratorClass, DerivedClass, NonIterator); +foreach ($classes as $class) { + echo Is $class iterateable? ; + dump_iterateable($class); +} +? +--EXPECT-- +Is ArrayObject iterateable? bool(true) +Is IteratorClass iterateable? bool(true) +Is DerivedClass iterateable? bool(true) +Is NonIterator iterateable? bool(false)
[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard config.w32
kalle Thu May 22 22:06:15 2008 UTC Modified files: (Branch: PHP_5_3) /php-srcNEWS /php-src/ext/standard config.w32 Log: [DOC] enable inet_pton() and inet_ntop() on Windows http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.182r2=1.2027.2.547.2.965.2.183diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.182 php-src/NEWS:1.2027.2.547.2.965.2.183 --- php-src/NEWS:1.2027.2.547.2.965.2.182 Sun May 18 22:07:23 2008 +++ php-src/NEWSThu May 22 22:06:14 2008 @@ -107,6 +107,7 @@ behavior. (Stas) - Added forward_static_call(_array) to complete LSB. (Mike Lively) - Added native support for asinh(), acosh(), atanh(), log1p() and expm1() (Kalle) +- inet_pton() and inet_ntop() is now available on Windows platforms (Kalle) - Improved PHP runtime speed and memory usage: . Use IS_CV for direct access to $this variable. (Dmitry) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.w32?r1=1.4.2.2.2.1.2.1r2=1.4.2.2.2.1.2.2diff_format=u Index: php-src/ext/standard/config.w32 diff -u php-src/ext/standard/config.w32:1.4.2.2.2.1.2.1 php-src/ext/standard/config.w32:1.4.2.2.2.1.2.2 --- php-src/ext/standard/config.w32:1.4.2.2.2.1.2.1 Fri Oct 5 15:00:08 2007 +++ php-src/ext/standard/config.w32 Thu May 22 22:06:15 2008 @@ -1,8 +1,11 @@ // vim:ft=javascript -// $Id: config.w32,v 1.4.2.2.2.1.2.1 2007/10/05 15:00:08 jani Exp $ +// $Id: config.w32,v 1.4.2.2.2.1.2.2 2008/05/22 22:06:15 kalle Exp $ ARG_WITH(config-file-scan-dir, Dir to check for additional php ini files, ); + AC_DEFINE(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR); +AC_DEFINE(HAVE_INET_PTON, 1); +AC_DEFINE(HAVE_INET_NTOP, 1); CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_STANDARD, ext/date/lib); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard config.w32
kalle Thu May 22 22:07:21 2008 UTC Modified files: /php-src/ext/standard config.w32 Log: Enable inet_pton() and inet_ntop() on Windows in HEAD http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.w32?r1=1.8r2=1.9diff_format=u Index: php-src/ext/standard/config.w32 diff -u php-src/ext/standard/config.w32:1.8 php-src/ext/standard/config.w32:1.9 --- php-src/ext/standard/config.w32:1.8 Sun Jul 15 19:50:06 2007 +++ php-src/ext/standard/config.w32 Thu May 22 22:07:21 2008 @@ -1,8 +1,11 @@ // vim:ft=javascript -// $Id: config.w32,v 1.8 2007/07/15 19:50:06 jani Exp $ +// $Id: config.w32,v 1.9 2008/05/22 22:07:21 kalle Exp $ ARG_WITH(config-file-scan-dir, Dir to check for additional php ini files, ); + AC_DEFINE(PHP_CONFIG_FILE_SCAN_DIR, PHP_CONFIG_FILE_SCAN_DIR); +AC_DEFINE(HAVE_INET_PTON, 1); +AC_DEFINE(HAVE_INET_NTOP, 1); CHECK_HEADER_ADD_INCLUDE(timelib_config.h, CFLAGS_STANDARD, ext/date/lib); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php