[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Status of 5.2 ports
- From: Daurnimator <quae@...>
- Date: Tue, 8 Nov 2011 21:58:58 +1100
On 8 November 2011 21:54, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> ==> 5.1/lrandom.c <==
>
> LUALIB_API int luaopen_random(lua_State *L)
> {
> luaL_newmetatable(L,MYTYPE);
> lua_setglobal(L,MYNAME);
> luaL_register(L,MYNAME,R);
> ...
>
> ==> 5.2/lrandom.c <==
>
> LUALIB_API int luaopen_random(lua_State *L)
> {
> luaL_newmetatable(L,MYTYPE);
> luaL_setfuncs(L,R,0);
> #ifdef EXPORT_GLOBAL
> lua_pushvalue(L,-1);
> lua_setglobal(L,MYNAME);
> #endif
> ...
>
> diff -u 5.1/test.lua 5.2/test.lua
> -require"random"
> +local random=require"random"
>
>
Why not have an EXPORT_GLOBAL for both 5.1 and 5.2? (defaults on for
5.1; off for 5.2)
I'd rather my 5.1 libraries didn't make a global.