helly Sun Mar 4 00:42:30 2007 UTC Modified files: /php-src/ext/spl spl_directory.c spl_directory.h Log: - And finally use prefix style names for consistency sake http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.c?r1=1.129&r2=1.130&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.129 php-src/ext/spl/spl_directory.c:1.130 --- php-src/ext/spl/spl_directory.c:1.129 Sun Mar 4 00:36:08 2007 +++ php-src/ext/spl/spl_directory.c Sun Mar 4 00:42:30 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.129 2007/03/04 00:36:08 helly Exp $ */ +/* $Id: spl_directory.c,v 1.130 2007/03/04 00:42:30 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -205,7 +205,7 @@ { int options = REPORT_ERRORS, flags; - if (intern->flags & SPL_FILE_DIR_USE_GLOB) { + if (intern->flags & SPL_FILE_DIR_GLOB_USE) { options |= STREAM_USE_GLOB_DIR_OPEN; } @@ -217,7 +217,7 @@ if (intern->u.dir.dirp && php_stream_is(intern->u.dir.dirp, &php_glob_stream_ops)) { intern->path.s = php_glob_stream_get_path(intern->u.dir.dirp, 1, &intern->path_len); intern->path_type = IS_STRING; - intern->flags |= SPL_FILE_DIR_USE_GLOB; + intern->flags |= SPL_FILE_DIR_GLOB_USE; php_glob_stream_get_count(intern->u.dir.dirp, &flags); if (flags & GLOB_APPEND) { intern->flags |= SPL_FILE_DIR_GLOB_REFETCH_PATH; @@ -226,10 +226,10 @@ } } else if (intern->path_len && IS_SLASH_AT(type, path, intern->path_len-1)) { intern->path = ezstrndup(type, path, --intern->path_len); - intern->flags &= ~(SPL_FILE_DIR_USE_GLOB|SPL_FILE_DIR_GLOB_REFETCH_PATH); + intern->flags &= ~(SPL_FILE_DIR_GLOB_USE|SPL_FILE_DIR_GLOB_REFETCH_PATH); } else { intern->path = ezstrndup(type, path, intern->path_len); - intern->flags &= ~(SPL_FILE_DIR_USE_GLOB|SPL_FILE_DIR_GLOB_REFETCH_PATH); + intern->flags &= ~(SPL_FILE_DIR_GLOB_USE|SPL_FILE_DIR_GLOB_REFETCH_PATH); } intern->u.dir.index = 0; @@ -661,7 +661,7 @@ { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (intern->flags & SPL_FILE_DIR_USE_GLOB) { + if (intern->flags & SPL_FILE_DIR_GLOB_USE) { RETURN_LONG(php_glob_stream_get_count(intern->u.dir.dirp, NULL)); } zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Unable to determine count unless USE_GLOG flag is in effect"); @@ -1207,7 +1207,7 @@ INIT_PZVAL(&zflags); INIT_PZVAL(&zpath); - if ((intern->flags & (SPL_FILE_DIR_USE_GLOB|SPL_FILE_DIR_CHILD_GLOB)) == (SPL_FILE_DIR_USE_GLOB|SPL_FILE_DIR_CHILD_GLOB)) { + if ((intern->flags & (SPL_FILE_DIR_GLOB_USE|SPL_FILE_DIR_GLOB_CHILD)) == (SPL_FILE_DIR_GLOB_USE|SPL_FILE_DIR_GLOB_CHILD)) { ZVAL_LONG(&zflags, intern->flags); Z_TYPE(zpath) = IS_STRING; Z_STRLEN(zpath) = spprintf(&Z_STRVAL(zpath), 0, "%R%c%s", @@ -1215,7 +1215,7 @@ DEFAULT_SLASH, php_glob_stream_get_pattern(intern->u.dir.dirp, 0, NULL)); } else { - ZVAL_LONG(&zflags, intern->flags & ~(SPL_FILE_DIR_USE_GLOB|SPL_FILE_DIR_CHILD_GLOB)); + ZVAL_LONG(&zflags, intern->flags & ~(SPL_FILE_DIR_GLOB_USE|SPL_FILE_DIR_GLOB_CHILD)); ZVAL_ZSTRL(&zpath, intern->file_name_type, intern->file_name, intern->file_name_len, 1); } @@ -2507,8 +2507,8 @@ REGISTER_SPL_SUB_CLASS_EX(DirectoryIterator, SplFileInfo, spl_filesystem_object_new, spl_DirectoryIterator_functions); zend_class_implements(spl_ce_DirectoryIterator TSRMLS_CC, 1, zend_ce_iterator); - REGISTER_SPL_CLASS_CONST_LONG(DirectoryIterator, "USE_GLOB", SPL_FILE_DIR_USE_GLOB); - REGISTER_SPL_CLASS_CONST_LONG(DirectoryIterator, "CHILD_GLOB", SPL_FILE_DIR_CHILD_GLOB); + REGISTER_SPL_CLASS_CONST_LONG(DirectoryIterator, "GLOB", SPL_FILE_DIR_GLOB_USE); + REGISTER_SPL_CLASS_CONST_LONG(DirectoryIterator, "GLOB_CHILD", SPL_FILE_DIR_GLOB_CHILD); spl_ce_DirectoryIterator->get_iterator = spl_filesystem_dir_get_iterator; http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_directory.h?r1=1.33&r2=1.34&diff_format=u Index: php-src/ext/spl/spl_directory.h diff -u php-src/ext/spl/spl_directory.h:1.33 php-src/ext/spl/spl_directory.h:1.34 --- php-src/ext/spl/spl_directory.h:1.33 Sun Mar 4 00:36:08 2007 +++ php-src/ext/spl/spl_directory.h Sun Mar 4 00:42:30 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.h,v 1.33 2007/03/04 00:36:08 helly Exp $ */ +/* $Id: spl_directory.h,v 1.34 2007/03/04 00:42:30 helly Exp $ */ #ifndef SPL_DIRECTORY_H #define SPL_DIRECTORY_H @@ -120,9 +120,9 @@ #define SPL_FILE_DIR_KEY_AS_FILENAME 0x00000100 /* make RecursiveDirectoryTree::key() return getFilename() */ #define SPL_FILE_DIR_KEY_MODE_MASK 0x00000F00 /* mask RecursiveDirectoryTree::key() */ -#define SPL_FILE_DIR_USE_GLOB 0x00001000 /* use glob for open dir*/ +#define SPL_FILE_DIR_GLOB_USE 0x00001000 /* use glob for open dir*/ #define SPL_FILE_DIR_GLOB_REFETCH_PATH 0x00002000 /* whether we need to refetch the path in glob mode */ -#define SPL_FILE_DIR_CHILD_GLOB 0x00004000 /* do use glob on childs */ +#define SPL_FILE_DIR_GLOB_CHILD 0x00004000 /* do use glob on childs */ #endif /* SPL_DIRECTORY_H */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php