sfox Wed Jun 18 15:06:50 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/phar phar.c tar.c zip.c /php-src/ext/phar/tests cached_manifest_1.phpt Log: - Kill 10 MSVC compiler warnings due to type conflict - Make cached manifest test platform agnostic - Comment out zend_(init|destroy)_rsrc_list() and associated references @Greg: cached manifest test (now) passes here regardless, make of that what you will http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.21&r2=1.370.2.22&diff_format=u Index: php-src/ext/phar/phar.c diff -u php-src/ext/phar/phar.c:1.370.2.21 php-src/ext/phar/phar.c:1.370.2.22 --- php-src/ext/phar/phar.c:1.370.2.21 Wed Jun 18 06:38:47 2008 +++ php-src/ext/phar/phar.c Wed Jun 18 15:06:50 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c,v 1.370.2.21 2008/06/18 06:38:47 cellog Exp $ */ +/* $Id: phar.c,v 1.370.2.22 2008/06/18 15:06:50 sfox Exp $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -115,7 +115,7 @@ /* fake request startup */ PHAR_GLOBALS->request_init = 1; - zend_init_rsrc_list(TSRMLS_C); + //zend_init_rsrc_list(TSRMLS_C); PHAR_G(has_bz2) = zend_hash_exists(&module_registry, "bz2", sizeof("bz2")); PHAR_G(has_zlib) = zend_hash_exists(&module_registry, "zlib", sizeof("zlib")); /* these two are dummies and will be destroyed later */ @@ -149,8 +149,8 @@ PHAR_GLOBALS->phar_alias_map.arBuckets = 0; zend_hash_destroy(&cached_phars); zend_hash_destroy(&cached_alias); - zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC); - memset(&EG(regular_list), 0, sizeof(HashTable)); + //zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC); + //memset(&EG(regular_list), 0, sizeof(HashTable)); /* free cached manifests */ PHAR_GLOBALS->request_init = 0; return; @@ -172,8 +172,8 @@ cached_alias = PHAR_GLOBALS->phar_alias_map; PHAR_GLOBALS->phar_fname_map.arBuckets = 0; PHAR_GLOBALS->phar_alias_map.arBuckets = 0; - zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC); - memset(&EG(regular_list), 0, sizeof(HashTable)); + //zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC); + //memset(&EG(regular_list), 0, sizeof(HashTable)); efree(tmp); } /* }}} */ @@ -976,11 +976,11 @@ /* set up our manifest */ zend_hash_init(&mydata->manifest, manifest_count, - zend_get_hash_value, destroy_phar_manifest_entry, mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, mydata->is_persistent); + zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, manifest_count * 2, - zend_get_hash_value, NULL, mydata->is_persistent); + zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); offset = halt_offset + manifest_len + 4; memset(&entry, 0, sizeof(phar_entry_info)); entry.phar = mydata; @@ -1301,7 +1301,7 @@ zend_hash_init(&mydata->mounted_dirs, sizeof(char *), zend_get_hash_value, NULL, 0); zend_hash_init(&mydata->virtual_dirs, sizeof(char *), - zend_get_hash_value, NULL, mydata->is_persistent); + zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); mydata->fname_len = fname_len; snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); mydata->is_temporary_alias = alias ? 0 : 1; @@ -3358,7 +3358,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.21 $"); + php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.22 $"); 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/tar.c?r1=1.55.2.11&r2=1.55.2.12&diff_format=u Index: php-src/ext/phar/tar.c diff -u php-src/ext/phar/tar.c:1.55.2.11 php-src/ext/phar/tar.c:1.55.2.12 --- php-src/ext/phar/tar.c:1.55.2.11 Wed Jun 18 06:38:47 2008 +++ php-src/ext/phar/tar.c Wed Jun 18 15:06:50 2008 @@ -218,11 +218,11 @@ myphar->is_persistent = PHAR_G(persist); /* estimate number of entries, can't be certain with tar files */ zend_hash_init(&myphar->manifest, 2 + (totalsize >> 12), - zend_get_hash_value, destroy_phar_manifest_entry, myphar->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)myphar->is_persistent); zend_hash_init(&myphar->mounted_dirs, 5, - zend_get_hash_value, NULL, myphar->is_persistent); + zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); zend_hash_init(&myphar->virtual_dirs, 4 + (totalsize >> 11), - zend_get_hash_value, NULL, myphar->is_persistent); + zend_get_hash_value, NULL, (zend_bool)myphar->is_persistent); myphar->is_tar = 1; /* remember whether this entire phar was compressed with gz/bzip2 */ myphar->flags = compression; http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.9&r2=1.47.2.10&diff_format=u Index: php-src/ext/phar/zip.c diff -u php-src/ext/phar/zip.c:1.47.2.9 php-src/ext/phar/zip.c:1.47.2.10 --- php-src/ext/phar/zip.c:1.47.2.9 Wed Jun 18 06:38:47 2008 +++ php-src/ext/phar/zip.c Wed Jun 18 15:06:50 2008 @@ -255,11 +255,11 @@ php_stream_seek(fp, PHAR_GET_32(locator.cdir_offset), SEEK_SET); /* read in central directory */ zend_hash_init(&mydata->manifest, PHAR_GET_16(locator.count), - zend_get_hash_value, destroy_phar_manifest_entry, mydata->is_persistent); + zend_get_hash_value, destroy_phar_manifest_entry, (zend_bool)mydata->is_persistent); zend_hash_init(&mydata->mounted_dirs, 5, - zend_get_hash_value, NULL, mydata->is_persistent); + zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); zend_hash_init(&mydata->virtual_dirs, PHAR_GET_16(locator.count) * 2, - zend_get_hash_value, NULL, mydata->is_persistent); + zend_get_hash_value, NULL, (zend_bool)mydata->is_persistent); entry.phar = mydata; entry.is_zip = 1; entry.fp_type = PHAR_FP; http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cached_manifest_1.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/phar/tests/cached_manifest_1.phpt diff -u php-src/ext/phar/tests/cached_manifest_1.phpt:1.1.2.1 php-src/ext/phar/tests/cached_manifest_1.phpt:1.1.2.2 --- php-src/ext/phar/tests/cached_manifest_1.phpt:1.1.2.1 Wed Jun 18 06:38:47 2008 +++ php-src/ext/phar/tests/cached_manifest_1.phpt Wed Jun 18 15:06:50 2008 @@ -3,7 +3,7 @@ --SKIPIF-- <?php if (!extension_loaded("phar")) die("skip"); ?> --INI-- -phar.cache_list={PWD}/files/nophar.phar +phar.cache_list={$cwd}/files/nophar.phar --FILE-- <?php $pname = 'phar://' . dirname(__FILE__) . '/files/nophar.phar';
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php