pajoye          Fri Aug  8 15:52:53 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/zip    php_zip.c php_zip.h 
  Log:
  - MFH: use PHP_ZIP_VERSION_STRING and add add_ascii_assoc_string macro (easy 
sync)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.15&r2=1.1.2.38.2.16&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.15 
php-src/ext/zip/php_zip.c:1.1.2.38.2.16
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.15     Fri Aug  8 15:41:25 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 15:52:53 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -88,9 +88,13 @@
                RETURN_FALSE; \
        } \
        RETURN_TRUE;
-
 /* }}} */
 
+#if (PHP_MAJOR_VERSION < 6)
+# define add_ascii_assoc_string add_assoc_string
+# define add_ascii_assoc_long add_assoc_long
+#endif
+
 #ifdef ZEND_ENGINE_2_1
 /* {{{ php_zip_extract_file */
 /* TODO: Simplify it */
@@ -345,13 +349,13 @@
 #define RETURN_SB(sb) \
        { \
                array_init(return_value); \
-               add_assoc_string(return_value, "name", (char *)(sb)->name, 1); \
-               add_assoc_long(return_value, "index", (long) (sb)->index); \
-               add_assoc_long(return_value, "crc", (long) (sb)->crc); \
-               add_assoc_long(return_value, "size", (long) (sb)->size); \
-               add_assoc_long(return_value, "mtime", (long) (sb)->mtime); \
-               add_assoc_long(return_value, "comp_size", (long) 
(sb)->comp_size); \
-               add_assoc_long(return_value, "comp_method", (long) 
(sb)->comp_method); \
+               add_ascii_assoc_string(return_value, "name", (char 
*)(sb)->name, 1); \
+               add_ascii_assoc_long(return_value, "index", (long) 
(sb)->index); \
+               add_ascii_assoc_long(return_value, "crc", (long) (sb)->crc); \
+               add_ascii_assoc_long(return_value, "size", (long) (sb)->size); \
+               add_ascii_assoc_long(return_value, "mtime", (long) 
(sb)->mtime); \
+               add_ascii_assoc_long(return_value, "comp_size", (long) 
(sb)->comp_size); \
+               add_ascii_assoc_long(return_value, "comp_method", (long) 
(sb)->comp_method); \
        }
 /* }}} */
 
@@ -1071,7 +1075,7 @@
        NULL,
        NULL,
        PHP_MINFO(zip),
-       "@PACKAGE_VERSION@",
+       PHP_ZIP_VERSION_STRING,
        STANDARD_MODULE_PROPERTIES
 };
 /* }}} */
@@ -2611,8 +2615,8 @@
        php_info_print_table_start();
 
        php_info_print_table_row(2, "Zip", "enabled");
-       php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $");
-       php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
+       php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $");
+       php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
        php_info_print_table_row(2, "Libzip version", "0.7.1");
 
        php_info_print_table_end();
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.h?r1=1.10.2.3.2.5&r2=1.10.2.3.2.6&diff_format=u
Index: php-src/ext/zip/php_zip.h
diff -u php-src/ext/zip/php_zip.h:1.10.2.3.2.5 
php-src/ext/zip/php_zip.h:1.10.2.3.2.6
--- php-src/ext/zip/php_zip.h:1.10.2.3.2.5      Fri Jul  4 14:50:07 2008
+++ php-src/ext/zip/php_zip.h   Fri Aug  8 15:52:53 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_zip.h,v 1.10.2.3.2.5 2008/07/04 14:50:07 felipe Exp $ */
+/* $Id: php_zip.h,v 1.10.2.3.2.6 2008/08/08 15:52:53 pajoye Exp $ */
 
 #ifndef PHP_ZIP_H
 #define PHP_ZIP_H
@@ -36,6 +36,8 @@
 
 #include "lib/zip.h"
 
+#define PHP_ZIP_VERSION_STRING "1.8.11"
+
 #ifndef ZEND_ENGINE_2_1
 # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0) || PHP_MAJOR_VERSION == 
6
 #  define ZEND_ENGINE_2_1
@@ -53,7 +55,7 @@
 #if (PHP_MAJOR_VERSION < 6)
 #define OPENBASEDIR_CHECKPATH(filename) \
        (PG(safe_mode) && (!php_checkuid(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)
-#else 
+#else
 #define OPENBASEDIR_CHECKPATH(filename) \
        php_check_open_basedir(filename TSRMLS_CC)
 #endif



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

Reply via email to