mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Test speed thought...
This commit is contained in:
parent
8eb10388c1
commit
412718badb
|
@ -289,6 +289,7 @@ struct getter<T*> {
|
||||||
}
|
}
|
||||||
|
|
||||||
static T* get_no_nil_from(lua_State* L, void* udata, int index = -1) {
|
static T* get_no_nil_from(lua_State* L, void* udata, int index = -1) {
|
||||||
|
#if 0
|
||||||
#ifndef SOL_NO_EXCEPTIONS
|
#ifndef SOL_NO_EXCEPTIONS
|
||||||
if (luaL_getmetafield(L, index, &detail::base_class_check_key()[0]) != 0) {
|
if (luaL_getmetafield(L, index, &detail::base_class_check_key()[0]) != 0) {
|
||||||
void* basecastdata = lua_touserdata(L, -1);
|
void* basecastdata = lua_touserdata(L, -1);
|
||||||
|
@ -315,6 +316,7 @@ struct getter<T*> {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
#endif // No Runtime Type Information || Exceptions
|
#endif // No Runtime Type Information || Exceptions
|
||||||
|
#endif // Speed test
|
||||||
T* obj = static_cast<T*>(udata);
|
T* obj = static_cast<T*>(udata);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user