@@ -157,7 +157,7 @@ inline int lua_rawgetp_x(lua_State* L, int idx, void* p)
157157
158158inline void lua_rawsetp_x (lua_State* L, int idx, void * p)
159159{
160- return lua_rawsetp (L, idx, p);
160+ lua_rawsetp (L, idx, p);
161161}
162162
163163#else
@@ -202,7 +202,7 @@ inline int lua_getstack_info_x(lua_State* L, int level, const char* what, lua_De
202202
203203inline int lua_rawgetp_x (lua_State* L, int idx, void * p)
204204{
205- #if LUA_VERSION_NUM < 502
205+ #if LUA_VERSION_NUM < 503
206206 idx = lua_absindex (L, idx);
207207 luaL_checkstack (L, 1 , " not enough stack slots" );
208208 lua_pushlightuserdata (L, p);
@@ -215,29 +215,19 @@ inline int lua_rawgetp_x(lua_State* L, int idx, void* p)
215215
216216inline void lua_rawsetp_x (lua_State* L, int idx, void * p)
217217{
218- #if LUA_VERSION_NUM < 502
218+ #if LUA_VERSION_NUM < 503
219219 idx = lua_absindex (L, idx);
220220 luaL_checkstack (L, 1 , " not enough stack slots" );
221221 lua_pushlightuserdata (L, p);
222222 lua_insert (L, -2 );
223223 lua_rawset (L, idx);
224224#else
225- return lua_rawsetp (L, idx, p);
225+ lua_rawsetp (L, idx, p);
226226#endif
227227}
228228
229229#endif // LUABRIDGE_ON_LUAU
230230
231- inline int lua_rawgetp_x (lua_State* L, int idx, const void * p)
232- {
233- return lua_rawgetp_x (L, idx, const_cast <void *>(p));
234- }
235-
236- inline void lua_rawsetp_x (lua_State* L, int idx, const void * p)
237- {
238- return lua_rawsetp_x (L, idx, const_cast <void *>(p));
239- }
240-
241231// These are for Lua versions prior to 5.5.0.
242232#if LUA_VERSION_NUM < 505
243233inline lua_State* lua_newstate_x (lua_Alloc f, void * ud, [[maybe_unused]] unsigned seed)
@@ -287,6 +277,16 @@ inline lua_Integer to_integerx(lua_State* L, int idx, int* isnum)
287277}
288278#endif // LUA_VERSION_NUM < 503
289279
280+ inline int lua_rawgetp_x (lua_State* L, int idx, const void * p)
281+ {
282+ return lua_rawgetp_x (L, idx, const_cast <void *>(p));
283+ }
284+
285+ inline void lua_rawsetp_x (lua_State* L, int idx, const void * p)
286+ {
287+ lua_rawsetp_x (L, idx, const_cast <void *>(p));
288+ }
289+
290290#ifndef LUA_OK
291291#define LUABRIDGE_LUA_OK 0
292292#else
0 commit comments