| 121 | |
| 122 | template <typename RetT, typename ObjT, typename... ArgTs> |
| 123 | typename std::enable_if<std::is_void<RetT>::value, RetT>::type dukglue_pcall_method(duk_context* ctx, const ObjT& obj, const char* method_name, ArgTs... args) |
| 124 | { |
| 125 | dukglue::detail::SafeMethodCallData<RetT, ObjT, ArgTs...> data { |
| 126 | &obj, method_name, std::tuple<ArgTs...>(args...), nullptr |
| 127 | }; |
| 128 | |
| 129 | duk_idx_t rc = duk_safe_call(ctx, &dukglue::detail::call_method_safe<RetT, ObjT, ArgTs...>, (void*) &data, 0, 1); |
| 130 | if (rc != 0) |
| 131 | throw DukErrorException(ctx, rc); |
| 132 | |
| 133 | duk_pop(ctx); // remove result from stack |
| 134 | } |
| 135 | |
| 136 | template <typename RetT, typename ObjT, typename... ArgTs> |
| 137 | typename std::enable_if<!std::is_void<RetT>::value, RetT>::type dukglue_pcall_method(duk_context* ctx, const ObjT& obj, const char* method_name, ArgTs... args) |
nothing calls this directly
no test coverage detected