diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2008-09-24 11:07:35 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2008-09-27 00:02:43 +0300 |
commit | 4a036760f6479eb56ad9d32146b3282c42f7b65d (patch) | |
tree | fe8b3f96f75734ca8eb2f9667895f2eea87ff8d0 /lua_scripts | |
parent | 7a11a69b9d527c5de43316416109d82f68bdc959 (diff) |
Added interface version check to the C/Lua script interface. - Backgroud: If the "ld.so-trick" is used to start tools from tools_root so that shared libraries are also used from tools_root, another instance of libsb2.so must be installed to tools_root. That libsb2.so must be compiled against the libc, which is available at tools_root => there will be two separately compiled versions of libsb2.so. These must be compiled from the same source, but the binaries are very probably slightly different, if the host os version != tools_root distribution. And still these must use the same lua scripts. Forgetting to update one libsb2.so can cause all kinds of strange side-effects (already tried that :-)
Diffstat (limited to 'lua_scripts')
-rw-r--r-- | lua_scripts/main.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lua_scripts/main.lua b/lua_scripts/main.lua index f71297a..9e141fe 100644 --- a/lua_scripts/main.lua +++ b/lua_scripts/main.lua @@ -8,6 +8,14 @@ debug = os.getenv("SBOX_MAPPING_DEBUG") debug_messages_enabled = sb.debug_messages_enabled() +-- This version string is used to check that the lua scripts offer +-- what the C files expect, and v.v. +-- Increment the serial number (first number) and update the initials +-- and date whenever the interface beween Lua and C is changed. +-- +-- NOTE: the corresponding identifier for C is in include/sb2.h +sb2_lua_c_interface_version = "28,lta-2008-09-23" + function do_file(filename) if (debug_messages_enabled) then sb.log("debug", string.format("Loading '%s'", filename)) |