Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Error: lua_remove undeclared under Lua 5.3 #73

Open
vlaze opened this issue Feb 9, 2017 · 1 comment
Open

Error: lua_remove undeclared under Lua 5.3 #73

vlaze opened this issue Feb 9, 2017 · 1 comment

Comments

@vlaze
Copy link

vlaze commented Feb 9, 2017

I've been trying to compile your luaffi release following the README file. However, I get an error which won't let me continue:

call.c: In function ‘reserve_code’:
call.c:179:31: error: ‘lua_remove’ undeclared (first use in this function)
         ADDFUNC(jit->lua_dll, lua_remove);

As far as I could investigate, this is caused because lua_remove has become a macro in Lua 5.3, which is the one I am using. Is there any workaround I could use? Feel free to ask for more information if you require it.

@Silur
Copy link

Silur commented Apr 2, 2017

I added this into call.c so it can resolve the macro as a function:

static void (lua_remove)(lua_State *L, int idx) {
    lua_remove(L, idx);
}

If you check the first lines of call.c you can see that push_float etc is already wrapped in this way

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants