| 280 | |
| 281 | template <typename RetT> |
| 282 | typename 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 | |
| 292 | template <typename RetT> |
| 293 | typename std::enable_if<!std::is_void<RetT>::value, RetT>::type dukglue_peval(duk_context* ctx, const char* str) |
nothing calls this directly
no test coverage detected