Software /
code /
prosody
Comparison
util-src/windows.c @ 7818:54669df178c2
util-src: Make C modules assert that the Lua runtime matches what it was compiled for
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 08 Jan 2017 14:21:08 +0100 |
parent | 6789:6b180e77c97a |
child | 7889:b8d694646597 |
comparison
equal
deleted
inserted
replaced
7816:2624f4ee34a2 | 7818:54669df178c2 |
---|---|
101 { "set_consolecolor", Lset_consolecolor }, | 101 { "set_consolecolor", Lset_consolecolor }, |
102 { NULL, NULL } | 102 { NULL, NULL } |
103 }; | 103 }; |
104 | 104 |
105 LUALIB_API int luaopen_util_windows(lua_State* L) { | 105 LUALIB_API int luaopen_util_windows(lua_State* L) { |
106 #if (LUA_VERSION_NUM > 501) | |
107 luaL_checkversion(L); | |
108 #endif | |
106 lua_newtable(L); | 109 lua_newtable(L); |
107 luaL_setfuncs(L, Reg, 0); | 110 luaL_setfuncs(L, Reg, 0); |
108 lua_pushliteral(L, "-3.14"); | 111 lua_pushliteral(L, "-3.14"); |
109 lua_setfield(L, -2, "version"); | 112 lua_setfield(L, -2, "version"); |
110 return 1; | 113 return 1; |