mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
revert last commit to phar_object.c
fix open file pointers issue on windows
This commit is contained in:
parent
4c68617106
commit
ba002c5b9c
@ -213,6 +213,13 @@ int phar_archive_delref(phar_archive_data *phar TSRMLS_DC) /* {{{ */
|
||||
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;
|
||||
}
|
||||
|
@ -1172,16 +1172,6 @@ PHP_METHOD(Phar, getSupportedCompression)
|
||||
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;
|
||||
@ -3449,7 +3439,6 @@ zend_function_entry php_archive_methods[] = {
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user