mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Avoid getThis() usages in zip extension
There isn't any magic going on here, we can just use ZEND_THIS and assume it exists.
This commit is contained in:
parent
ab36540bdd
commit
84a080ef50
1 changed files with 2 additions and 10 deletions
|
@ -2884,15 +2884,11 @@ static void _php_zip_progress_callback(zip_t *arch, double state, void *ptr)
|
||||||
PHP_METHOD(ZipArchive, registerProgressCallback)
|
PHP_METHOD(ZipArchive, registerProgressCallback)
|
||||||
{
|
{
|
||||||
struct zip *intern;
|
struct zip *intern;
|
||||||
zval *self = getThis();
|
zval *self = ZEND_THIS;
|
||||||
double rate;
|
double rate;
|
||||||
zval *callback;
|
zval *callback;
|
||||||
ze_zip_object *obj;
|
ze_zip_object *obj;
|
||||||
|
|
||||||
if (!self) {
|
|
||||||
RETURN_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "dz", &rate, &callback) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS(), "dz", &rate, &callback) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2942,14 +2938,10 @@ static int _php_zip_cancel_callback(zip_t *arch, void *ptr)
|
||||||
PHP_METHOD(ZipArchive, registerCancelCallback)
|
PHP_METHOD(ZipArchive, registerCancelCallback)
|
||||||
{
|
{
|
||||||
struct zip *intern;
|
struct zip *intern;
|
||||||
zval *self = getThis();
|
zval *self = ZEND_THIS;
|
||||||
zval *callback;
|
zval *callback;
|
||||||
ze_zip_object *obj;
|
ze_zip_object *obj;
|
||||||
|
|
||||||
if (!self) {
|
|
||||||
RETURN_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callback) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callback) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue