bjori Sun Nov 12 17:16:14 2006 UTC Modified files: (Branch: PHP_5_2) /php-src README.UPDATE_5_2 /php-src/ext/spl spl_directory.c /php-src/ext/spl/tests fileobject_003.phpt Log: MFH: SplFileObject::getFilename() no longer overwrites SplFileInfo::getFilename() (SplFileObject::getFilename() therefor only returns the filename now) http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.34&r2=1.1.2.35&diff_format=u Index: php-src/README.UPDATE_5_2 diff -u php-src/README.UPDATE_5_2:1.1.2.34 php-src/README.UPDATE_5_2:1.1.2.35 --- php-src/README.UPDATE_5_2:1.1.2.34 Thu Nov 9 12:35:12 2006 +++ php-src/README.UPDATE_5_2 Sun Nov 12 17:16:13 2006 @@ -188,6 +188,10 @@ ZipArchive::setCommentIndex() now return TRUE on success As of 5.2.1 #See http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.15&r2=1.1.2.16 +In ext/spl +========== +SplFileObject::getFilename() now returns the filename, not relative/path/to/file +As of 5.2.1 #See http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.10&r2=1.45.2.27.2.11 ================== NEW ERROR MESSAGES ================== http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.27.2.10&r2=1.45.2.27.2.11&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.27.2.10 php-src/ext/spl/spl_directory.c:1.45.2.27.2.11 --- php-src/ext/spl/spl_directory.c:1.45.2.27.2.10 Mon Nov 6 23:20:11 2006 +++ php-src/ext/spl/spl_directory.c Sun Nov 12 17:16:13 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.27.2.10 2006/11/06 23:20:11 bjori Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.27.2.11 2006/11/12 17:16:13 bjori Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -550,7 +550,7 @@ { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (intern->path_len) { + if (intern->path_len && intern->path_len < intern->file_name_len) { RETURN_STRINGL(intern->file_name + intern->path_len + 1, intern->file_name_len - (intern->path_len + 1), 1); } else { RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); @@ -1658,15 +1658,6 @@ spl_filesystem_file_rewind(getThis(), intern TSRMLS_CC); } /* }}} */ -/* {{{ proto string SplFileObject::getFilename() - Return the filename */ -SPL_METHOD(SplFileObject, getFilename) -{ - spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - - RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); -} /* }}} */ - /* {{{ proto void SplFileObject::eof() Return whether end of file is reached */ SPL_METHOD(SplFileObject, eof) @@ -2153,7 +2144,6 @@ static zend_function_entry spl_SplFileObject_functions[] = { SPL_ME(SplFileObject, __construct, arginfo_file_object___construct, ZEND_ACC_PUBLIC) - SPL_ME(SplFileObject, getFilename, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, rewind, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, eof, NULL, ZEND_ACC_PUBLIC) SPL_ME(SplFileObject, valid, NULL, ZEND_ACC_PUBLIC) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/fileobject_003.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/spl/tests/fileobject_003.phpt diff -u php-src/ext/spl/tests/fileobject_003.phpt:1.1.2.4 php-src/ext/spl/tests/fileobject_003.phpt:1.1.2.5 --- php-src/ext/spl/tests/fileobject_003.phpt:1.1.2.4 Mon Nov 6 15:21:45 2006 +++ php-src/ext/spl/tests/fileobject_003.phpt Sun Nov 12 17:16:13 2006 @@ -55,12 +55,12 @@ string(%d) "%sfileobject_001a.txt" string(%d) "%sfileobject_001a.txt" bool(true) -string(%d) "%sfileobject_001a.txt" +string(19) "fileobject_001a.txt" bool(true) string(%d) "%stests" bool(true) string(%d) "%sfileobject_001a.txt" -string(%d) "%sfileobject_001a.txt" +string(19) "fileobject_001a.txt" string(%d) "%stests" ===1=== object(SplFileInfo)#%d (0) { @@ -73,7 +73,7 @@ string(%d) "%stests/" string(%d) "%stests" bool(true) -string(%d) "%stests" +string(5) "tests" bool(true) string(%d) "%sspl" bool(true) @@ -91,11 +91,11 @@ string(%d) "%stests" string(%d) "%stests" bool(true) -string(%d) "%stests" +string(%d) "tests" bool(true) string(%d) "%sspl" bool(true) string(%d) "%stests" -string(%d) "%stests" +string(5) "tests" string(%d) "%sspl" ===DONE===
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php