LuaBridge3 icon indicating copy to clipboard operation
LuaBridge3 copied to clipboard

lua_rawgetp/lua_rawsetp errors when using Luau VM with LuaBridge3

Open xcrdev opened this issue 4 months ago • 1 comments

I had to do this when including luabridge3 and using the luau vm:

#include "lua.h" #include "lualib.h" // Avoid Luau macro / LuaBridge helper collision #undef lua_rawgetp #undef lua_rawsetp #include "LuaBridge/LuaBridge.h"

otherwise i got these errors: /Users/xavier/Developer/binding_generator/build/_deps/luabridge3-src/Source/LuaBridge/detail/LuaHelpers.h:177:12: error: expected parameter declarator 177 | inline int lua_rawgetp(lua_State* L, int idx, const void* p) | ^ /Users/xavier/Developer/binding_generator/build/_deps/luau-src/VM/include/lua.h:388:61: note: expanded from macro 'lua_rawgetp' 388 | #define lua_rawgetp(L, idx, p) lua_rawgetptagged(L, idx, p, 0)

I used luabridge3 version master and luau version 0.701.

xcrdev avatar Dec 03 '25 00:12 xcrdev

I see, they have implemented these functions so we might drop these macros on recent luau

kunitoki avatar Dec 03 '25 05:12 kunitoki