mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Swapped luabind for non-boost fork
https://github.com/decimad/luabind-deboostified
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user