MCPcopy Create free account
hub / github.com/ThePhD/sol2 / make_reference_userdata

Function make_reference_userdata

include/sol/make_reference.hpp:53–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52 template <typename R = reference, bool should_pop = !is_stack_based_v<R>, typename T>
53 R make_reference_userdata(lua_State* L, T&& value) {
54 int backpedal = stack::push_userdata(L, std::forward<T>(value));
55 R r = stack::get<R>(L, -backpedal);
56 if (should_pop) {
57 lua_pop(L, backpedal);
58 }
59 return r;
60 }
61
62 template <typename T, typename R = reference, bool should_pop = !is_stack_based_v<R>, typename... Args>
63 R make_reference_userdata(lua_State* L, Args&&... args) {

Callers

nothing calls this directly

Calls 1

push_userdataFunction · 0.85

Tested by

no test coverage detected