cellog          Sat Jun 21 17:05:18 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/phar   phar.c 
  Log:
  PHP 5.2 fixes to direct include of compressed archives
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.25&r2=1.370.2.26&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.25 php-src/ext/phar/phar.c:1.370.2.26
--- php-src/ext/phar/phar.c:1.370.2.25  Fri Jun 20 12:21:32 2008
+++ php-src/ext/phar/phar.c     Sat Jun 21 17:05:18 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar.c,v 1.370.2.25 2008/06/20 12:21:32 sfox Exp $ */
+/* $Id: phar.c,v 1.370.2.26 2008/06/21 17:05:18 cellog Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -3123,13 +3123,13 @@
 }
 /* }}} */
 
-#if PHP_VERSION_ID >= 50300
 static size_t phar_zend_stream_reader(void *handle, char *buf, size_t len 
TSRMLS_DC) /* {{{ */
 {
        return php_stream_read(phar_get_pharfp((phar_archive_data*)handle 
TSRMLS_CC), buf, len);
 }
 /* }}} */
 
+#if PHP_VERSION_ID >= 50300
 static size_t phar_zend_stream_fsizer(void *handle TSRMLS_DC) /* {{{ */
 {
        return ((phar_archive_data*)handle)->halt_offset + 32;
@@ -3137,7 +3137,7 @@
 
 #else /* PHP_VERSION_ID */
 
-static long stream_fteller_for_zend(void *handle TSRMLS_DC) /* {{{ */
+static long phar_stream_fteller_for_zend(void *handle TSRMLS_DC) /* {{{ */
 {
        return (long)php_stream_tell(phar_get_pharfp((phar_archive_data*)handle 
TSRMLS_CC));
 }
@@ -3201,9 +3201,9 @@
                                file_handle->free_filename = 0;
                                /* we do our own reading directly from the 
phar, don't change the next line */
                                file_handle->handle.stream.handle = phar;
-                               file_handle->handle.stream.reader = 
(zend_stream_reader_t)_php_stream_read;
+                               file_handle->handle.stream.reader = 
phar_zend_stream_reader;
                                file_handle->handle.stream.closer = NULL; /* 
don't close - let phar handle this one */
-                               file_handle->handle.stream.fteller = 
stream_fteller_for_zend;
+                               file_handle->handle.stream.fteller = 
phar_stream_fteller_for_zend;
                                file_handle->handle.stream.interactive = 0;
                                phar->is_persistent ?
                                        
php_stream_rewind(PHAR_GLOBALS->cached_fp[phar->phar_pos].fp) :
@@ -3406,7 +3406,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.25 $");
+       php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.26 $");
        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");



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to