lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Yes just look at the tools.c under lua lanes , It does everything accept threads. Here are the function you should look at
luaG_inter_copy and inter_copy_one. Only thing this file depends on is threading.h , you can use it or just redefine your own MUTEX_LOCK,MUTEX_UNLOCK and MUTEX_T. If you do use there threading.h you will need to patch line 170
put the following line. extern volatile bool_t sudo; or you will get a ton link errors.

On Sat, Mar 20, 2010 at 12:27 PM, Mark Hamburg <mark@grubmah.com> wrote:
On Mar 20, 2010, at 1:54 AM, Asko Kauppi wrote:

> If you are interested in copying functions, the Lanes code can do that. It also copies upvalues.
>
> -asko

Does it also copy the environment? How does it decide where to stop? For example, if I stick math.sin into a local variable math_sin and reference this as an upvalue in the function I'm passing, what does it do?

Mark