cvs: pecl /zip php_zip.c
| From: | Pierre-Alain Joye | Date: | Sun, 12 Mar 2006 14:12:35 +0000 |
| Subject: | cvs: pecl /zip php_zip.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5425@lists.php.net to get a copy of this message | ||
pajoye Sun Mar 12 14:12:35 2006 UTC
Modified files:
/pecl/zip php_zip.c
Log:
- no need to reset refcount here (leak)
http://cvs.php.net/viewcvs.cgi/pecl/zip/php_zip.c?r1=1.26&r2=1.27&diff_format=u
Index: pecl/zip/php_zip.c
diff -u pecl/zip/php_zip.c:1.26 pecl/zip/php_zip.c:1.27
--- pecl/zip/php_zip.c:1.26 Sat Mar 11 14:21:25 2006
+++ pecl/zip/php_zip.c Sun Mar 12 14:12:34 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.26 2006/03/11 14:21:25 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.27 2006/03/12 14:12:34 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -352,6 +352,7 @@
return retval;
}
/* }}} */
+
static HashTable *php_zip_get_properties(zval *object TSRMLS_DC)/* {{{ */
{
ze_zip_object *obj;
@@ -373,9 +374,7 @@
zend_hash_get_current_key_ex(obj->prop_handler, &key, &key_len, &num_key, 0,
NULL);
MAKE_STD_ZVAL(val);
ret = php_zip_property_reader(obj, hnd, &val, 0 TSRMLS_CC);
- if (ret == SUCCESS) {
- val->refcount = 0;
- } else {
+ if (ret != SUCCESS) {
val = EG(uninitialized_zval_ptr);
}
zend_hash_update(props, key, key_len, (void *)&val, sizeof(zval *), NULL);
@@ -1292,10 +1291,8 @@
REGISTER_ZIP_CLASS_CONST_LONG("ER_REMOVE", ZIP_ER_REMOVE); /* S Can't remove file
*/
REGISTER_ZIP_CLASS_CONST_LONG("ER_DELETED", ZIP_ER_DELETED); /* N Entry has been
deleted */
-#if ZIP_USE_WRAPPER
php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper TSRMLS_CC);
#endif
-#endif
le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name,
module_number);
le_zip_entry = zend_register_list_destructors_ex(php_zip_free_entry, NULL, le_zip_entry_name,
module_number);
@@ -1310,9 +1307,7 @@
{
#ifdef ZEND_ENGINE_2_1
zend_hash_destroy(&zip_prop_handlers);
-# if ZIP_USE_WRAPPER
php_unregister_url_stream_wrapper("zip" TSRMLS_CC);
-# endif
#endif
return SUCCESS;
}
@@ -1325,7 +1320,7 @@
php_info_print_table_start();
{
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "$Id: php_zip.c,v 1.26 2006/03/11 14:21:25 pajoye Exp $",
"enabled");
+ php_info_print_table_row(2, "$Id: php_zip.c,v 1.27 2006/03/12 14:12:34 pajoye Exp $",
"enabled");
php_info_print_table_row(2, "Libzip version", "0.6.1");
}
php_info_print_table_end();