mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Additional nullptr
's for GCC's whining ass, and more reinterpret casts. Also for GCC's whiny ass.
This commit is contained in:
parent
2d2ad59492
commit
51f7010363
|
@ -49,7 +49,7 @@ struct static_lua_func {
|
|||
void* functiondata = lua_touserdata(L, lua_upvalueindex(1));
|
||||
//if (functiondata == nullptr)
|
||||
// throw sol_error("call from lua to c++ function has null function pointer data");
|
||||
fx_t* fx = *static_cast<fx_t*>(functiondata);
|
||||
fx_t* fx = reinterpret_cast<fx_t*>(functiondata);
|
||||
int r = typed_call(tuple_types<typename fx_traits::return_type>(), typename fx_traits::args_type(), fx, L);
|
||||
return r;
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ private:
|
|||
const char* freefuncname = fkey.c_str();
|
||||
const luaL_Reg funcreg[ 2 ] = {
|
||||
{ freefuncname, freefunc },
|
||||
{ }
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user