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

Function GetObjMaxParams

source/script_object.cpp:1371–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1369}
1370
1371ResultType GetObjMaxParams(IObject *aObj, int &aMaxParams, ResultToken &aResultToken)
1372{
1373 __int64 propval = 0;
1374 auto result = GetObjectIntProperty(aObj, _T("MaxParams"), propval, aResultToken, true);
1375 switch (result)
1376 {
1377 case FAIL:
1378 case EARLY_EXIT:
1379 return result;
1380 case OK:
1381 aMaxParams = (int)propval;
1382 propval = 0;
1383 result = GetObjectIntProperty(aObj, _T("IsVariadic"), propval, aResultToken, true);
1384 switch (result)
1385 {
1386 case FAIL:
1387 case EARLY_EXIT:
1388 return result;
1389 case INVOKE_NOT_HANDLED:
1390 return OK;
1391 case OK:
1392 if (propval)
1393 aMaxParams = INT_MAX;
1394 }
1395 }
1396 return result;
1397}
1398
1399ResultType Object::DefineProp(ResultToken &aResultToken, int aID, int aFlags, ExprTokenType *aParam[], int aParamCount)
1400{

Callers 1

DefinePropMethod · 0.85

Calls 1

GetObjectIntPropertyFunction · 0.85

Tested by

no test coverage detected