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

Function alloc_newuserdata

include/sol/stack_core.hpp:73–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 using unique_tag = detail::inheritance_unique_cast_function;
72
73 inline void* alloc_newuserdata(lua_State* L, std::size_t bytesize) {
74#if SOL_LUA_VERSION_I_ >= 504
75 return lua_newuserdatauv(L, bytesize, 1);
76#else
77 return lua_newuserdata(L, bytesize);
78#endif
79 }
80
81 constexpr std::uintptr_t align(std::size_t alignment, std::uintptr_t ptr, std::size_t& space) {
82 // this handles arbitrary alignments...

Callers 7

attempt_allocFunction · 0.85
attempt_alloc_uniqueFunction · 0.85
usertype_allocateFunction · 0.85
usertype_unique_allocateFunction · 0.85
user_allocateFunction · 0.85
pushMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected