Swapped luabind for non-boost fork

https://github.com/decimad/luabind-deboostified
This commit is contained in:
Adam Martin
2019-02-02 00:06:32 -06:00
parent cbe811cf94
commit 26eb4fb6e0
123 changed files with 9408 additions and 10110 deletions
+22 -20
View File
@@ -29,27 +29,29 @@
#include <luabind/detail/class_rep.hpp>
#include <luabind/detail/stack_utils.hpp>
namespace luabind { namespace detail
{
LUABIND_API void do_call_member_selection(lua_State* L, char const* name)
{
object_rep* obj = static_cast<object_rep*>(lua_touserdata(L, -1));
lua_pop(L, 1); // pop self
namespace luabind {
namespace detail {
obj->crep()->get_table(L); // push the crep table
lua_pushstring(L, name);
lua_gettable(L, -2);
lua_remove(L, -2); // remove the crep table
LUABIND_API void do_call_member_selection(lua_State* L, char const* name)
{
object_rep* obj = static_cast<object_rep*>(lua_touserdata(L, -1));
assert(obj);
if (!is_luabind_function(L, -1))
return;
lua_pushstring(L, name);
lua_gettable(L, -2);
lua_replace(L, -2);
// this (usually) means the function has not been
// overridden by lua, call the default implementation
lua_pop(L, 1);
obj->crep()->get_default_table(L); // push the crep table
lua_pushstring(L, name);
lua_gettable(L, -2);
lua_remove(L, -2); // remove the crep table
if(!is_luabind_function(L, -1))
return;
// this (usually) means the function has not been
// overridden by lua, call the default implementation
lua_pop(L, 1);
obj->crep()->get_default_table(L); // push the crep table
lua_pushstring(L, name);
lua_gettable(L, -2);
lua_remove(L, -2); // remove the crep table
}
}
}}
}