phar_destroy_phar_data(phar TSRMLS_CC);
}
return 1;
+ } else if (!phar->refcount) {
+ if (phar->fp) {
+ /* close open file handle - allows removal or rename of
+ the file on windows, which has greedy locking */
+ php_stream_close(phar->fp);
+ phar->fp = NULL;
+ }
}
return 0;
}
return; \
}
-/* {{{ proto void Phar::__destruct()
- * remove reference count of phar
- */
-PHP_METHOD(Phar, __destruct)
-{
- PHAR_ARCHIVE_OBJECT();
-
- phar_archive_delref(phar_obj->arc.archive TSRMLS_CC);
-}
-
static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{ */
{
zval **value;
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PRIVATE)
#else
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PUBLIC)
- PHP_ME(Phar, __destruct, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phar, startBuffering, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phar, stopBuffering, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Phar, compressAllFilesGZ, NULL, ZEND_ACC_PUBLIC)