diff options
| author | Alexander Lantsev <aunsane@gmail.com> | 2015-06-16 20:20:18 +0000 | 
|---|---|---|
| committer | Alexander Lantsev <aunsane@gmail.com> | 2015-06-16 20:20:18 +0000 | 
| commit | 3a7b2c4c645ffecd24df0862b649e79ca5edbfbf (patch) | |
| tree | 85f86c67d5595ac160a208cfe22f4dc730f0ddc8 | |
| parent | 90b62d09470b28b2d39e073b4baee403ffc86903 (diff) | |
MirLua: added NULL to core module
git-svn-id: http://svn.miranda-ng.org/main/trunk@14219 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
| -rw-r--r-- | plugins/MirLua/src/m_core.cpp | 2 | ||||
| -rw-r--r-- | plugins/MirLua/src/mlua.cpp | 2 | ||||
| -rw-r--r-- | plugins/MirLua/src/mlua.h | 2 | 
3 files changed, 5 insertions, 1 deletions
| diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index 77dab3299d..e71c20471d 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -206,5 +206,7 @@ luaL_Reg CMLua::coreLib[] =  	{ "Translate", lua_Translate },
  	{ "ReplaceVariables", lua_ReplaceVariables },
 +	{ "NULL", NULL },
 +
  	{ NULL, NULL }
  };
 diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index f7b5208ccb..cf3562bedc 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -13,6 +13,8 @@ CMLua::CMLua() : L(NULL)  	lua_pop(L, 1);
  	luaL_newlib(L, coreLib);
 +	lua_pushlightuserdata(L, NULL); +	lua_setfield(L, -2, "NULL");
  	lua_setglobal(L, "m");
  	Preload(MLUA_DATABASE, luaopen_m_database);
 diff --git a/plugins/MirLua/src/mlua.h b/plugins/MirLua/src/mlua.h index d5a2f0c891..cf1eb7c0fa 100644 --- a/plugins/MirLua/src/mlua.h +++ b/plugins/MirLua/src/mlua.h @@ -5,7 +5,7 @@ class CMLua  {
  private:
  	lua_State *L;
 -	static luaL_Reg coreLib[14];
 +	static luaL_Reg coreLib[15];
  	void Preload(const char *name, lua_CFunction func);
 | 
