[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: cloning lua state
- From: Josh Simmons <simmons.44@...>
- Date: Wed, 8 Oct 2014 10:59:03 +1100
On Wed, Oct 8, 2014 at 5:51 AM, Philipp Kraus
<philipp.kraus@tu-clausthal.de> wrote:
>
> I must do something like:
>
> std::vector< std::string > function = lua_getglobalfunction();
> for(std::size_t i=0; i < function.size(); ++i
> {
> lua_getglobal( L, function[i].c_str() );
> lua_dump
> }
This seems like a really bad idea. :)
A general solution to copying a Lua state is going to be either very
fragile or very complicated or both. Is there perhaps a way you can
explicitly do the required copy operations when you need them as
opposed to implementing a general copy constructor?
Cheers,
Josh.