summaryrefslogtreecommitdiff
path: root/source/3rd-party/Luax/luax_vm.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-03-29 00:43:25 +0800
committerchai <chaifix@163.com>2019-03-29 00:43:25 +0800
commitf4c338c63f3456a8eccd56c35e233843687d55be (patch)
tree7278fe4723320c9ef310c5a04d92bf0be1bc778c /source/3rd-party/Luax/luax_vm.h
parent3bced067a4144381e59ce4bd0eb749eeff5ad1f4 (diff)
*thread
Diffstat (limited to 'source/3rd-party/Luax/luax_vm.h')
-rw-r--r--source/3rd-party/Luax/luax_vm.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/3rd-party/Luax/luax_vm.h b/source/3rd-party/Luax/luax_vm.h
new file mode 100644
index 0000000..e99d5b5
--- /dev/null
+++ b/source/3rd-party/Luax/luax_vm.h
@@ -0,0 +1,38 @@
+#ifndef __LUAX_CONTEXT_H__
+#define __LUAX_CONTEXT_H__
+
+#include "luax_ref.h"
+#include "luax_config.h"
+#include "luax_state.h"
+
+namespace Luax
+{
+
+ ///
+ /// lua_stateصcontextһϵдļϣҲûϵҪΪ˽Լڴ档
+ ///
+ class LuaxVM
+ {
+ public:
+ LuaxVM(lua_State* L);
+ ~LuaxVM();
+
+ void Setup();
+
+ LuaxState state; // lua main state
+ LuaxRefTable strongRefTable; // strong ref table
+ LuaxRefTable weakRefTable; // weak ref table
+
+ size_t objectCount; // ͳڴstateдʵ
+
+ private:
+
+ void SetupRefTables();
+
+ int mThreadsCount; // context߳
+
+ };
+
+}
+
+#endif \ No newline at end of file