MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / CallMetaVarg

Method CallMetaVarg

source/script_object.cpp:855–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855ResultType Object::CallMetaVarg(int aFlags, LPTSTR aName, ResultToken &aResultToken, ExprTokenType &aThisToken, ExprTokenType *aParam[], int aParamCount)
856{
857 auto func = GetMethod(sMetaFuncName[INVOKE_TYPE]);
858 if (!func)
859 return INVOKE_NOT_HANDLED;
860 auto vargs = Array::Create(aParam, aParamCount);
861 if (!vargs)
862 _o_throw_oom;
863 ExprTokenType name_token(aName), args_token(vargs), *param[4];
864 param[0] = &aThisToken; // this
865 param[1] = &name_token; // name
866 param[2] = &args_token; // args
867 int param_count = 3;
868 if (IS_INVOKE_SET)
869 param[param_count++] = aParam[aParamCount]; // value
870 // return %func%(this, name, args [, value])
871 ResultType aResult = func->Invoke(aResultToken, IT_CALL, nullptr, ExprTokenType(func), param, param_count);
872 vargs->Release();
873 return aResult;
874}
875
876
877//

Callers

nothing calls this directly

Calls 3

ExprTokenTypeClass · 0.85
InvokeMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected