summaryrefslogtreecommitdiff
path: root/Runtime/Lua/LuaBind/LuaBindState.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Lua/LuaBind/LuaBindState.h')
-rw-r--r--Runtime/Lua/LuaBind/LuaBindState.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Runtime/Lua/LuaBind/LuaBindState.h b/Runtime/Lua/LuaBind/LuaBindState.h
index 776b23d..1f236df 100644
--- a/Runtime/Lua/LuaBind/LuaBindState.h
+++ b/Runtime/Lua/LuaBind/LuaBindState.h
@@ -15,6 +15,8 @@ namespace LuaBind
class StrongRef;
class WeakRef;
+ typedef void (*ErrorHandler) (cc8 * msg);
+
// 对lua_State的代理,除了保存一个lua_State的引用不保存其他内容。一个实例的metatable如下:
// class table
// member table
@@ -60,7 +62,7 @@ namespace LuaBind
int GetTop();
bool CheckParams(int idx, cc8* format);
int AbsIndex(int idx);
- void Call(int nArgs, int nResults);
+ void Call(int nArgs, int nResults, ErrorHandler handler = NULL);
//------------------------------------------------------------------------------//
@@ -137,7 +139,8 @@ namespace LuaBind
//------------------------------------------------------------------------------//
void DoString(const std::string& code);
- void DoFile(const std::string& file);
+ void DoFile(const std::string& file, ErrorHandler handler = NULL);
+ void LoadFile(const std::string& file);
//------------------------------------------------------------------------------//
// 注册方法
@@ -187,7 +190,7 @@ namespace LuaBind
};
//--------------------------------------------------------------------------------//
- // GetValue()模板特化
+// GetValue()模板特化
template <> bool State::GetValue < bool >(int idx, const bool value);
template <> cc8* State::GetValue < cc8* >(int idx, const cc8* value);