| 88 | |
| 89 | |
| 90 | ResultType Var::PopulateVirtualVar() |
| 91 | { |
| 92 | FuncResult result_token; |
| 93 | result_token.symbol = SYM_INTEGER; // For _f_return_i() and consistency with BIFs. |
| 94 | mVV->Get(result_token, mName); |
| 95 | if (result_token.Exited()) |
| 96 | return FAIL; |
| 97 | if (result_token.mem_to_free) |
| 98 | { |
| 99 | _AcceptNewMem(result_token.mem_to_free, result_token.marker_length); |
| 100 | mAttrib |= VAR_ATTRIB_VIRTUAL_OPEN; |
| 101 | return OK; |
| 102 | } |
| 103 | size_t length; |
| 104 | LPTSTR value = TokenToString(result_token, result_token.buf, &length); |
| 105 | if (!AssignString(nullptr, length)) |
| 106 | return FAIL; |
| 107 | tmemcpy(mCharContents, value, length + 1); |
| 108 | return OK; |
| 109 | } |
| 110 | |
| 111 | |
| 112 |
no test coverage detected