[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luaffi vs luajit ffi
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Wed, 23 May 2012 01:38:28 +0300
On Wed, May 23, 2012 at 1:35 AM, Miles Bader <email@example.com> wrote:
> Cosmin Apreutesei <firstname.lastname@example.org> writes:
>>> Writing code that runs under 5.1 / 5.2 / non-FFI-LuaJIT is
>>> generally very easy, because differences are quite minor.
>> I have 60 modules starting with setfenv(1, require'winapi') so that
>> everything goes in the same namespace. What would be a reasonable
>> migration option to 5.2 for this?
> Maybe something like:
> local _ENV = require 'winapi' -- handles 5.2
> if setfenv then setfenv (1, _ENV) end -- handles 5.1
Hm, that's actually not that bad. Thanks.
> Patience, n. A minor form of despair, disguised as a virtue.