[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (rc1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 28 Apr 2020 17:55:03 -0300
> I guess we can cast it to `cast first to void (*)(void)` first to fix it,
>
> lua_CFunction f = (lua_CFunction)(void
> (*)(void))GetProcAddress((HMODULE)lib, sym);
Just to be sure, can you check whether the following also avoid the
warning? It is the same as yours, but using a typedef:
typedef void (*voidf)(void);
static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) {
lua_CFunction f = (lua_CFunction)(voidf)GetProcAddress((HMODULE)lib, sym);
if (f == NULL) pusherror(L);
return f;
}
Many thanks,
-- Roberto
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org