diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-07 20:55:38 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-07 20:55:38 +0000 |
commit | a674fbe45df718f194948a7fa399c58fd9672519 (patch) | |
tree | fe59698871070fed40af646e5e83c22d47e69b7c /plugins/MirLua/src/mlua.cpp | |
parent | ba275795eba1936a3c395527cc55936a4dc02f9d (diff) |
MirLua: initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@14061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp new file mode 100644 index 0000000000..ee6d91e117 --- /dev/null +++ b/plugins/MirLua/src/mlua.cpp @@ -0,0 +1,20 @@ +#include "stdafx.h" + +CMLua::CMLua()
+{
+ lua = luaL_newstate();
+
+ luaL_openlibs(lua);
+ luaL_newlib(lua, CMLua::CoreFunctions);
+ lua_setglobal(lua, "M");
+}
+
+CMLua::~CMLua() +{ + lua_close(lua); +} + +void CMLua::Load(const char *name) +{ + luaL_dofile(lua, name); +}
\ No newline at end of file |