| 1063 | // In this test we'll use the debug functions to update a script parameter directly on the stack |
| 1064 | |
| 1065 | void DebugCall() |
| 1066 | { |
| 1067 | asIScriptContext *ctx = asGetActiveContext(); |
| 1068 | |
| 1069 | // Get the address of the output parameter |
| 1070 | void *varPointer = ctx->GetAddressOfVar(0, 0); |
| 1071 | |
| 1072 | // We got the address to the handle |
| 1073 | CScriptString **str = (CScriptString**)varPointer; |
| 1074 | |
| 1075 | // Set the handle to point to a new string |
| 1076 | *str = new CScriptString("test"); |
| 1077 | |
| 1078 | // It is possible to determine the function that is being called too |
| 1079 | asIScriptFunction *func = ctx->GetSystemFunction(); |
| 1080 | assert( std::string(func->GetDeclaration()) == "void debugCall()" ); |
| 1081 | } |
| 1082 | |
| 1083 | bool Test2() |
| 1084 | { |
nothing calls this directly
no test coverage detected