mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
add destructor for Phar object to decrease refcount
This commit is contained in:
parent
82ad02f0cd
commit
4c68617106
@ -1172,6 +1172,16 @@ PHP_METHOD(Phar, getSupportedCompression)
|
|||||||
return; \
|
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) /* {{{ */
|
static int phar_build(zend_object_iterator *iter, void *puser TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
zval **value;
|
zval **value;
|
||||||
@ -3439,6 +3449,7 @@ zend_function_entry php_archive_methods[] = {
|
|||||||
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PRIVATE)
|
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PRIVATE)
|
||||||
#else
|
#else
|
||||||
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PUBLIC)
|
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, startBuffering, NULL, ZEND_ACC_PUBLIC)
|
||||||
PHP_ME(Phar, stopBuffering, NULL, ZEND_ACC_PUBLIC)
|
PHP_ME(Phar, stopBuffering, NULL, ZEND_ACC_PUBLIC)
|
||||||
PHP_ME(Phar, compressAllFilesGZ, NULL, ZEND_ACC_PUBLIC)
|
PHP_ME(Phar, compressAllFilesGZ, NULL, ZEND_ACC_PUBLIC)
|
||||||
|
Loading…
Reference in New Issue
Block a user