]> granicus.if.org Git - php/commitdiff
fix TSRM, a couple of compile warnings on windows, and test
authorGreg Beaver <cellog@php.net>
Thu, 18 Oct 2007 19:47:24 +0000 (19:47 +0000)
committerGreg Beaver <cellog@php.net>
Thu, 18 Oct 2007 19:47:24 +0000 (19:47 +0000)
ext/phar/phar.c
ext/phar/tests/031.phpt

index 2d956d18502c1decdf5f00e0026ce241e6bfe804..521bd69bde55d25c7f08335e2710938f7998ccb0 100644 (file)
@@ -244,7 +244,8 @@ static void destroy_phar_data(void *pDest) /* {{{ */
        TSRMLS_FETCH();
 
        if (PHAR_GLOBALS->request_ends) {
-               return destroy_phar_data_only(pDest);
+               destroy_phar_data_only(pDest);
+               return;
        }
        zend_hash_apply_with_argument(&(PHAR_GLOBALS->phar_alias_map), phar_unalias_apply, phar_data TSRMLS_CC);
        if (--phar_data->refcount < 0) {
@@ -507,7 +508,7 @@ static int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len
                if (for_trunc) {
                        if (entry->fp == phar->fp) {
                                /* duplicate entry if we are writing and are recycling the phar fp */
-                               if (FAILURE == phar_open_entry_file(phar, entry, error)) {
+                               if (FAILURE == phar_open_entry_file(phar, entry, error TSRMLS_CC)) {
                                        return FAILURE;
                                }
                                (*ret)->fp = entry->fp;
@@ -559,7 +560,7 @@ static int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len
        } else {
                (*ret)->fp = 0;
                if (for_write) {
-                       if (FAILURE == phar_open_entry_file(phar, entry, error)) {
+                       if (FAILURE == phar_open_entry_file(phar, entry, error TSRMLS_CC)) {
                                return FAILURE;
                        }
                        (*ret)->fp = entry->fp;
@@ -2531,9 +2532,9 @@ int phar_flush(phar_archive_data *archive, char *user_stub, long len, char **err
                        php_stream_rewind(file);
                }
                php_stream_filter_append(&file->readfilters, filter);
-               entry->compressed_filesize = php_stream_copy_to_stream(file, entry->cfp, entry->uncompressed_filesize+8192 TSRMLS_CC);
+               entry->compressed_filesize = (php_uint32) php_stream_copy_to_stream(file, entry->cfp, (size_t) entry->uncompressed_filesize+8192 TSRMLS_CC);
                php_stream_filter_flush(filter, 1 TSRMLS_CC);
-               entry->compressed_filesize += php_stream_copy_to_stream(file, entry->cfp, entry->uncompressed_filesize+8192 TSRMLS_CC);
+               entry->compressed_filesize += (php_uint32) php_stream_copy_to_stream(file, entry->cfp, (size_t) entry->uncompressed_filesize+8192 TSRMLS_CC);
                php_stream_filter_remove(filter, 1 TSRMLS_CC);
                /* generate crc on compressed file */
                php_stream_rewind(entry->cfp);
index 952ba72a403709f3b9ecf3947616556ba31983f3..94c14d5194fb542624a7ddd7f6ba98c40be03f22 100755 (executable)
@@ -28,4 +28,4 @@ __halt_compiler();
 --EXPECTF--
 string(25) "<?php echo new new class;"
 
-Parse error: %s error%sexpecting%s in phar://%sphar_oo_test.phar.php/a.php on line %d
+Parse error: %s error%sunexpected%s in phar://%sphar_oo_test.phar.php/a.php on line %d