[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: upgrading to version 3
- From: lhf@... (Luiz Henrique de Figueiredo)
- Date: Thu, 27 Aug 1998 10:32:44 -0300 (EST)
>From: Norman Ramsey <firstname.lastname@example.org>
> A bunch of my code is breaking under version 3.1 that worked under 3.0.
In a private mail, Norman told me:
>The following names were undefined
>The first two may be my fault, because I don't think I include
>lualib.h. The latter two with #defines in 3.0 but not apparently in 3.1.
Just to reassure everyone: *nothing* is really being broken.
All you need is to #define LUA_COMPAT2_5 (which was on by default in 3.0,
but no longer on in 3.1).
Here's is my answer to Norman, which I think might be useful to others.
Since 3.0, iolib_open and strlib_open are called lua_iolibopen and
lua_strlibopen. There are #defines for this in lualib.h.
However, lua_iolibopen and lua_strlibopen are the official names.
In 3.1, the #defines for lua_getsubscript and lua_storeglobal (and others)
are still in lua.h, but you have to explicitly #define LUA_COMPAT2_5 to
get them. In 3.0, LUA_COMPAT2_5 was #define'd to be 1. This has changed in 3.1,
and LUA_COMPAT2_5 is left undefined.
So, bottom line: add -DLUA_COMPAT2_5 to you Makefile if you really need to
use the names lua_getsubscript and lua_storeglobal.
However, I suggest that you use the official names lua_gettable and