From c68fcc48207a7b23393a9bc07f72570de8fcef86 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 27 Jan 2013 23:51:05 +0000 Subject: add version number treatment for lua. The headers still need fixes for version 5.2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2936 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/Lua/ULua.pas | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/lib') diff --git a/src/lib/Lua/ULua.pas b/src/lib/Lua/ULua.pas index 1de48a3c..59161dde 100644 --- a/src/lib/Lua/ULua.pas +++ b/src/lib/Lua/ULua.pas @@ -1,7 +1,8 @@ unit ULua; (* - * A complete Pascal wrapper for Lua 5.1 DLL module. + * A complete Pascal wrapper for Lua DLL module. + * Version 5.1 or 5.2 * * Created by Geo Massar, 2006 * Distributed as free/open source. @@ -34,15 +35,12 @@ const LuaDLL = 'lua5.1.dll'; {$ENDIF} {$IFDEF UNIX} -{$IFDEF DARWIN} - LuaDLL = 'liblua.5.1.dylib'; - {$linklib liblua.5.1} -{$ELSE} - LuaDLL = lua_lib_name; -{$ENDIF} -{$ENDIF} -{$IFDEF MACOS} - SDLgfxLibName = 'lua5.1'; + {$IFDEF DARWIN} + LuaDLL = 'liblua.dylib'; + {$linklib liblua} + {$ELSE} + LuaDLL = lua_lib_name; + {$ENDIF} {$ENDIF} (* formats for Lua numbers *) @@ -139,8 +137,8 @@ const *) const - LUA_VERSION = 'Lua 5.1'; - LUA_VERSION_NUM = 501; + LUA_VERSION = 'Lua ' + LUA_VERSION_MAJOR + '.' + LUA_VERSION_MINOR; + LUA_VERSION_NUM = 100*(ord(LUA_VERSION_MAJOR) - ord('0')) + (ord(LUA_VERSION_MINOR) - ord('0')); LUA_COPYRIGHT = 'Copyright (C) 1994-2006 Tecgraf, PUC-Rio'; LUA_AUTHORS = 'R. Ierusalimschy, L. H. de Figueiredo & W. Celes'; -- cgit v1.2.3