sfox Fri Jun 20 16:29:37 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/phar util.c zip.c
Log:
- 5_2 compatibility stuff (so we can stay in sync with PECL)
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/util.c?r1=1.55.2.14&r2=1.55.2.15&diff_format=u
Index: php-src/ext/phar/util.c
diff -u php-src/ext/phar/util.c:1.55.2.14 php-src/ext/phar/util.c:1.55.2.15
--- php-src/ext/phar/util.c:1.55.2.14 Fri Jun 20 06:37:14 2008
+++ php-src/ext/phar/util.c Fri Jun 20 16:29:36 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: util.c,v 1.55.2.14 2008/06/20 06:37:14 cellog Exp $ */
+/* $Id: util.c,v 1.55.2.15 2008/06/20 16:29:36 sfox Exp $ */
#include "phar_internal.h"
#ifdef PHAR_HAVE_OPENSSL
@@ -336,7 +336,7 @@
efree(entry);
if (*filename == '.') {
- phar_archive_data **pphar;
+ phar_archive_data **pphar = NULL;
int try_len;
if (FAILURE == phar_get_archive(pphar, arch, arch_len, NULL, 0,
NULL TSRMLS_CC)) {
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.10&r2=1.47.2.11&diff_format=u
Index: php-src/ext/phar/zip.c
diff -u php-src/ext/phar/zip.c:1.47.2.10 php-src/ext/phar/zip.c:1.47.2.11
--- php-src/ext/phar/zip.c:1.47.2.10 Wed Jun 18 15:06:50 2008
+++ php-src/ext/phar/zip.c Fri Jun 20 16:29:36 2008
@@ -213,11 +213,15 @@
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);
@@ -405,11 +409,15 @@
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