[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: table deep copy in C/CPP
- From: Mariusz Stanisz <mar@...>
- Date: Sat, 20 Mar 2010 15:48:54 -0500
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 <email@example.com>
On Mar 20, 2010, at 1:54 AM, Asko Kauppi wrote: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?
> If you are interested in copying functions, the Lanes code can do that. It also copies upvalues.