mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Change getThis() into ZEND_THIS where possible (#13641)
This commit is contained in:
@@ -279,7 +279,7 @@ ZEND_METHOD(Closure, bindTo)
|
||||
Z_PARAM_OBJ_OR_STR_OR_NULL(scope_obj, scope_str)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
do_closure_bind(return_value, getThis(), newthis, scope_obj, scope_str);
|
||||
do_closure_bind(return_value, ZEND_THIS, newthis, scope_obj, scope_str);
|
||||
}
|
||||
|
||||
static ZEND_NAMED_FUNCTION(zend_closure_call_magic) /* {{{ */ {
|
||||
|
||||
@@ -314,7 +314,7 @@ ZEND_METHOD(WeakReference, get)
|
||||
{
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
zend_weakref_get(getThis(), return_value);
|
||||
zend_weakref_get(ZEND_THIS, return_value);
|
||||
}
|
||||
|
||||
static zend_object *zend_weakmap_create_object(zend_class_entry *ce)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/* {{{ com_create_instance - ctor for COM class */
|
||||
PHP_METHOD(com, __construct)
|
||||
{
|
||||
zval *object = getThis();
|
||||
zval *object = ZEND_THIS;
|
||||
zend_string *server_name = NULL;
|
||||
HashTable *server_params = NULL;
|
||||
php_com_dotnet_object *obj;
|
||||
|
||||
@@ -217,7 +217,7 @@ out:
|
||||
/* {{{ com_dotnet_create_instance - ctor for DOTNET class */
|
||||
PHP_METHOD(dotnet, __construct)
|
||||
{
|
||||
zval *object = getThis();
|
||||
zval *object = ZEND_THIS;
|
||||
php_com_dotnet_object *obj;
|
||||
char *assembly_name, *datatype_name;
|
||||
size_t assembly_name_len, datatype_name_len;
|
||||
|
||||
@@ -278,7 +278,7 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream)
|
||||
|
||||
#define CPH_METHOD(fname) PHP_METHOD(COMPersistHelper, fname)
|
||||
|
||||
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
|
||||
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(ZEND_THIS);
|
||||
|
||||
#define CPH_NO_OBJ() if (helper->unk == NULL) { php_com_throw_exception(E_INVALIDARG, "No COM object is associated with this helper instance"); RETURN_THROWS(); }
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ PHP_METHOD(variant, __construct)
|
||||
{
|
||||
/* VARTYPE == unsigned short */ zend_long vt = VT_EMPTY;
|
||||
zend_long codepage = CP_ACP;
|
||||
zval *object = getThis();
|
||||
zval *object = ZEND_THIS;
|
||||
php_com_dotnet_object *obj;
|
||||
zval *zvalue = NULL;
|
||||
HRESULT res;
|
||||
|
||||
@@ -6524,7 +6524,7 @@ ZEND_METHOD(ReflectionReference, getId)
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
intern = Z_REFLECTION_P(getThis());
|
||||
intern = Z_REFLECTION_P(ZEND_THIS);
|
||||
if (Z_TYPE(intern->obj) != IS_REFERENCE) {
|
||||
_DO_THROW("Corrupted ReflectionReference object");
|
||||
RETURN_THROWS();
|
||||
|
||||
@@ -1612,7 +1612,7 @@ PHP_METHOD(SQLite3Stmt, getSQL)
|
||||
{
|
||||
php_sqlite3_stmt *stmt_obj;
|
||||
bool expanded = 0;
|
||||
zval *object = getThis();
|
||||
zval *object = ZEND_THIS;
|
||||
stmt_obj = Z_SQLITE3_STMT_P(object);
|
||||
int bind_rc;
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ static zend_always_inline void delegate_transfer_result(
|
||||
|
||||
static ZEND_METHOD(_ZendTestFiber, __construct)
|
||||
{
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(getThis());
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(ZEND_THIS);
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_FUNC(fiber->fci, fiber->fci_cache)
|
||||
@@ -240,7 +240,7 @@ static ZEND_METHOD(_ZendTestFiber, __construct)
|
||||
|
||||
static ZEND_METHOD(_ZendTestFiber, start)
|
||||
{
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(getThis());
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(ZEND_THIS);
|
||||
zval *params;
|
||||
uint32_t param_count;
|
||||
zend_array *named_params;
|
||||
@@ -304,7 +304,7 @@ static ZEND_METHOD(_ZendTestFiber, resume)
|
||||
Z_PARAM_ZVAL(value);
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
fiber = (zend_test_fiber *) Z_OBJ_P(getThis());
|
||||
fiber = (zend_test_fiber *) Z_OBJ_P(ZEND_THIS);
|
||||
|
||||
if (UNEXPECTED(fiber->context.status != ZEND_FIBER_STATUS_SUSPENDED || fiber->caller != NULL)) {
|
||||
zend_throw_error(NULL, "Cannot resume a fiber that is not suspended");
|
||||
@@ -325,7 +325,7 @@ static ZEND_METHOD(_ZendTestFiber, pipeTo)
|
||||
Z_PARAM_FUNC(fci, fci_cache)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(getThis());
|
||||
zend_test_fiber *fiber = (zend_test_fiber *) Z_OBJ_P(ZEND_THIS);
|
||||
zend_test_fiber *target = (zend_test_fiber *) zend_test_fiber_class->create_object(zend_test_fiber_class);
|
||||
|
||||
target->fci = fci;
|
||||
|
||||
Reference in New Issue
Block a user