| 16244 | |
| 16245 | template <typename T, bool checked, bool clean_stack, typename... TypeLists> |
| 16246 | inline int construct_trampolined(lua_State* L) { |
| 16247 | static const auto& meta = usertype_traits<T>::metatable(); |
| 16248 | int argcount = lua_gettop(L); |
| 16249 | call_syntax syntax = argcount > 0 ? stack::get_call_syntax(L, usertype_traits<T>::user_metatable(), 1) : call_syntax::dot; |
| 16250 | argcount -= static_cast<int>(syntax); |
| 16251 | |
| 16252 | T* obj = detail::usertype_allocate<T>(L); |
| 16253 | reference userdataref(L, -1); |
| 16254 | stack::stack_detail::undefined_metatable umf(L, &meta[0], &stack::stack_detail::set_undefined_methods_on<T>); |
| 16255 | umf(); |
| 16256 | |
| 16257 | // put userdata at the first index |
| 16258 | lua_insert(L, 1); |
| 16259 | construct_match<T, TypeLists...>(constructor_match<T, checked, clean_stack>(obj), L, argcount, 1 + static_cast<int>(syntax)); |
| 16260 | |
| 16261 | userdataref.push(); |
| 16262 | return 1; |
| 16263 | } |
| 16264 | |
| 16265 | template <typename T, bool checked, bool clean_stack, typename... TypeLists> |
| 16266 | inline int construct(lua_State* L) { |
nothing calls this directly
no test coverage detected