MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / dukglue_peval

Function dukglue_peval

Source/Utils/dukglue/public_util.h:282–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280
281template <typename RetT>
282typename std::enable_if<std::is_void<RetT>::value, RetT>::type dukglue_peval(duk_context* ctx, const char* str)
283{
284 int prev_top = duk_get_top(ctx);
285 int rc = duk_peval_string(ctx, str);
286 if (rc != 0)
287 throw DukErrorException(ctx, rc);
288
289 duk_pop_n(ctx, duk_get_top(ctx) - prev_top); // pop any results
290}
291
292template <typename RetT>
293typename std::enable_if<!std::is_void<RetT>::value, RetT>::type dukglue_peval(duk_context* ctx, const char* str)

Callers

nothing calls this directly

Calls 1

DukErrorExceptionClass · 0.85

Tested by

no test coverage detected