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

Method PopulateVirtualVar

source/var.cpp:90–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89
90ResultType 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

Callers 1

DerefIncludeMethod · 0.80

Calls 3

TokenToStringFunction · 0.85
ExitedMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected