Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix compilation against Lua 5.2. #24

Closed
wants to merge 1 commit into from

2 participants

@haasken

Lua 5.1 replaced the function lua_open with a preprocessor macro which
called luaL_newstate. Lua 5.2 then removed lua_open entirely. Thus,
LMT won't build against Lua 5.2. This change replaces the call to
lua_open() with a call to luaL_newstate(), and since that function only
exists in Lua >= 5.1, a minimum version number of 5.1 was added to the
spec file BuildRequires.

Ryan Haasken Fix compilation against Lua 5.2.
Lua 5.1 replaced the function lua_open with a preprocessor macro which
called luaL_newstate.  Lua 5.2 then removed lua_open entirely.  Thus,
LMT won't build against Lua 5.2.  This change replaces the call to
lua_open() with a call to luaL_newstate(), and since that function only
exists in Lua >= 5.1, a minimum version number of 5.1 was added to the
spec file BuildRequires.
6434ce2
@morrone
Owner

Patch cherry-picked onto master. Thanks!

@morrone morrone closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 6, 2014
  1. Fix compilation against Lua 5.2.

    Ryan Haasken authored
    Lua 5.1 replaced the function lua_open with a preprocessor macro which
    called luaL_newstate.  Lua 5.2 then removed lua_open entirely.  Thus,
    LMT won't build against Lua 5.2.  This change replaces the call to
    lua_open() with a call to luaL_newstate(), and since that function only
    exists in Lua >= 5.1, a minimum version number of 5.1 was added to the
    spec file BuildRequires.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  liblmt/lmtconf.c
  2. +1 −1  lmt.spec.in
View
2  liblmt/lmtconf.c
@@ -198,7 +198,7 @@ lmt_conf_init (int vopt, char *path)
path = PATH_LMTCONF; /* missing default config file is not fatal */
}
if (path) {
- L = lua_open ();
+ L = luaL_newstate();
luaL_openlibs(L);
if (luaL_loadfile (L, path) || lua_pcall (L, 0, 0, 0)) {
View
2  lmt.spec.in
@@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: mysql, mysql-devel
BuildRequires: cerebro >= 1.3-5
BuildRequires: ncurses-devel
-BuildRequires: lua-devel
+BuildRequires: lua-devel >= 5.1
#%define __spec_install_post /usr/lib/rpm/brp-compress || :
%define debug_package %{nil}
Something went wrong with that request. Please try again.