lua-users home
lua-l archive

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


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.