[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: Patrick Donnelly <batrick@...>
- Date: Thu, 16 Jun 2011 10:06:51 -0400
On Thu, Jun 16, 2011 at 9:04 AM, joao lobato <btnfdp.lobato@gmail.com> wrote:
> You can define a function like this:
> function f(_ENV, a, b)
> print(a,b)
> end
>
> and call it like this:
> env = {print = function(...) print('myprint',...) end}
> f(env,1,2)
>
> Isn't it enough?
We're talking about foreign code loaded through lua_load or in Lua
load[string]().
--
- Patrick Donnelly