sfox            Sat Jun 21 19:40:41 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/phar   phar_internal.h zip.c 
  Log:
  - Fix macro definition syntax
  - Remove pre-existing workaround
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar_internal.h?r1=1.109.2.18&r2=1.109.2.19&diff_format=u
Index: php-src/ext/phar/phar_internal.h
diff -u php-src/ext/phar/phar_internal.h:1.109.2.18 
php-src/ext/phar/phar_internal.h:1.109.2.19
--- php-src/ext/phar/phar_internal.h:1.109.2.18 Sat Jun 21 17:05:32 2008
+++ php-src/ext/phar/phar_internal.h    Sat Jun 21 19:40:41 2008
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: phar_internal.h,v 1.109.2.18 2008/06/21 17:05:32 cellog Exp $ */
+/* $Id: phar_internal.h,v 1.109.2.19 2008/06/21 19:40:41 sfox Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -80,7 +80,8 @@
 #endif
 
 #ifndef ALLOC_PERMANENT_ZVAL
-# define ALLOC_PERMANENT_ZVAL (z) = (zval*)malloc(sizeof(zval));
+# define ALLOC_PERMANENT_ZVAL(z) \
+       (z) = (zval*)malloc(sizeof(zval))
 #endif
 
 /* PHP_ because this is public information via MINFO */
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.11&r2=1.47.2.12&diff_format=u
Index: php-src/ext/phar/zip.c
diff -u php-src/ext/phar/zip.c:1.47.2.11 php-src/ext/phar/zip.c:1.47.2.12
--- php-src/ext/phar/zip.c:1.47.2.11    Fri Jun 20 16:29:36 2008
+++ php-src/ext/phar/zip.c      Sat Jun 21 19:40:41 2008
@@ -213,15 +213,13 @@
                                if (phar_parse_metadata(&metadata, 
&mydata->metadata, PHAR_GET_16(locator.comment_len) TSRMLS_CC) == FAILURE) {
                                        mydata->metadata_len = 0;
                                        /* if not valid serialized data, it is 
a regular string */
-#if PHP_VERSION_ID >= 50300
+
                                        if (entry.is_persistent) {
                                                
ALLOC_PERMANENT_ZVAL(mydata->metadata);
                                        } else {
                                                ALLOC_ZVAL(mydata->metadata);
                                        }
-#else
-                                       ALLOC_ZVAL(mydata->metadata);
-#endif
+
                                        INIT_ZVAL(*mydata->metadata);
                                        metadata = pestrndup(metadata, 
PHAR_GET_16(locator.comment_len), mydata->is_persistent);
                                        ZVAL_STRINGL(mydata->metadata, 
metadata, PHAR_GET_16(locator.comment_len), 0);
@@ -409,15 +407,13 @@
                        if (phar_parse_metadata(&p, &(entry.metadata), 
PHAR_GET_16(zipentry.comment_len) TSRMLS_CC) == FAILURE) {
                                entry.metadata_len = 0;
                                /* if not valid serialized data, it is a 
regular string */
-#if PHP_VERSION_ID >= 50300
+
                                if (entry.is_persistent) {
                                        ALLOC_PERMANENT_ZVAL(entry.metadata);
                                } else {
                                        ALLOC_ZVAL(entry.metadata);
                                }
-#else
-                               ALLOC_ZVAL(entry.metadata);
-#endif
+
                                INIT_ZVAL(*entry.metadata);
                                ZVAL_STRINGL(entry.metadata, pestrndup(buf, 
PHAR_GET_16(zipentry.comment_len), entry.is_persistent), 
PHAR_GET_16(zipentry.comment_len), 0);
                        }



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

Reply via email to