aboutsummaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/compat.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compat.h b/src/compat.h
index af014b1..0b6b12b 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -80,7 +80,7 @@ inline int luaL_optint(lua_State* L_, int n_, lua_Integer d_)
80 80
81#if LUA_VERSION_NUM < 504 81#if LUA_VERSION_NUM < 504
82 82
83void* lua_newuserdatauv(lua_State* L_, size_t sz_, int nuvalue_); 83void* lua_newuserdatauv(lua_State* L_, size_t sz_, UserValueCount nuvalue_);
84int lua_getiuservalue(lua_State* L_, StackIndex idx_, int n_); 84int lua_getiuservalue(lua_State* L_, StackIndex idx_, int n_);
85int lua_setiuservalue(lua_State* L_, StackIndex idx_, int n_); 85int lua_setiuservalue(lua_State* L_, StackIndex idx_, int n_);
86 86
@@ -138,7 +138,7 @@ inline LuaType luaG_type(lua_State* const L_, StackIndex const idx_)
138// use this in place of lua_absindex to save a function call 138// use this in place of lua_absindex to save a function call
139inline StackIndex luaG_absindex(lua_State* const L_, StackIndex const idx_) 139inline StackIndex luaG_absindex(lua_State* const L_, StackIndex const idx_)
140{ 140{
141 return StackIndex{ (idx_ >= 0 || idx_ <= kIdxRegistry) ? idx_ : lua_gettop(L_) + idx_ + 1 }; 141 return StackIndex{ (idx_ >= 0 || idx_ <= kIdxRegistry) ? idx_ : StackIndex{ lua_gettop(L_) + idx_ + 1 } };
142} 142}
143 143
144// ################################################################################################# 144// #################################################################################################
@@ -295,7 +295,7 @@ static inline void luaG_newlib(lua_State* const L_, luaL_Reg const (&funcs_)[N])
295// ################################################################################################# 295// #################################################################################################
296 296
297template <typename T> 297template <typename T>
298[[nodiscard]] T* luaG_newuserdatauv(lua_State* L_, int nuvalue_) 298[[nodiscard]] T* luaG_newuserdatauv(lua_State* L_, UserValueCount nuvalue_)
299{ 299{
300 return static_cast<T*>(lua_newuserdatauv(L_, sizeof(T), nuvalue_)); 300 return static_cast<T*>(lua_newuserdatauv(L_, sizeof(T), nuvalue_));
301} 301}