From 78e5891cd380fcc75c8754d339274892bb869754 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Wed, 15 Feb 2012 19:26:26 -0500 Subject: [PATCH] Portability - lua_open has been declared as deprecated in lua 5.1 and removed from 5.2. Usage of luaL_newstate is thus recommended in both series. Signed-off-by: Paul Beckingham --- AUTHORS | 1 + ChangeLog | 2 ++ src/API.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 074ec3e9f..983f958a5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -65,6 +65,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Martin Klepsch Ralph Bean Uli Martens + Michal Vyskocil Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index d34bcf8b6..880aeae78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -265,6 +265,8 @@ + Fixed problem with duplicate 'project changed' messages (thanks to Owen Clarke). + Fixed problem with non-UTC defaults for "TZ" (thanks to Owen Clarke). + + Removed use of Lua API call that is deprecated in 5.1 and removed from 5.2 + (thanks to Michal Vyskocil). ------ old releases ------------------------------ diff --git a/src/API.cpp b/src/API.cpp index e840a11ee..ddbc25cc0 100644 --- a/src/API.cpp +++ b/src/API.cpp @@ -131,7 +131,7 @@ API::~API () void API::initialize () { // Initialize Lua. - _state = lua_open (); + _state = luaL_newstate (); luaL_openlibs (_state); // TODO Error handling // Register all the API functions in Lua global space.