There isn't any magic going on here, we can just use ZEND_THIS
and assume it exists.
PHP_METHOD(ZipArchive, registerProgressCallback)
{
struct zip *intern;
- zval *self = getThis();
+ zval *self = ZEND_THIS;
double rate;
zval *callback;
ze_zip_object *obj;
- if (!self) {
- RETURN_FALSE;
- }
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "dz", &rate, &callback) == FAILURE) {
return;
}
PHP_METHOD(ZipArchive, registerCancelCallback)
{
struct zip *intern;
- zval *self = getThis();
+ zval *self = ZEND_THIS;
zval *callback;
ze_zip_object *obj;
- if (!self) {
- RETURN_FALSE;
- }
-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callback) == FAILURE) {
return;
}