lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Roberto Ierusalimschy <roberto@inf.puc-rio.br> 于2020年4月29日周三 上午6:47写道:

> 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;
> }

I tested. It works. No warnings after adding `(voidf)`.

-- 
http://blog.codingnow.com
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org