MCPcopy Create free account
hub / github.com/covscript/covscript / fcall_guard

Class fcall_guard

include/covscript/impl/impl.hpp:192–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 };
191
192 class fcall_guard final {
193 public:
194#ifdef CS_DEBUGGER
195 fcall_guard() = delete;
196
197 explicit fcall_guard(const std::string &decl)
198 {
199 current_process->stack.push(null_pointer);
200 current_process->stack_backtrace.push(decl);
201 }
202
203 ~fcall_guard()
204 {
205 current_process->stack.pop_no_return();
206 current_process->stack_backtrace.pop_no_return();
207 }
208#else
209
210 fcall_guard()
211 {
212 current_process->stack.push(null_pointer);
213 }
214
215 ~fcall_guard()
216 {
217 current_process->stack.pop_no_return();
218 }
219
220#endif
221
222 var &get() const
223 {
224 return current_process->stack.top();
225 }
226 };
227
228 std::string get_sdk_path();
229} // namespace cs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected