[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Serializing Lua State in use with Luabind
- From: Ben Sunshine-Hill <sneftel@...>
- Date: Mon, 16 May 2005 10:51:20 -0700
On 5/16/05, Stefan Schwarzbach <Schwarzbach@silentdreams.de> wrote:
> But what I'm not sure is, that the meta table I will add to the
> permantents table does not contain any data that will be needed when
> restoring the Lua state... I hope so
It seems unlikely that there'd be any stuff that changes.
>
> Then I have another question:
> In my project, I also must access instances of c++ classes from lua. How
> does the serialization of lua functions happen. Could it be a problem to
> serialize a lua function which locally calls a function of a c++ class
> or simply a c/c++ function? Can you serialize this?
The most common situation is the following:
function someluafunc()
somecfunc()
end
in this case, someluafunc does not actually reference the C function
somecfunc. Instead, it references the string "somecfunc", and when it
is executed it looks up the entry in the global table with that key.
So the serializer never even touches the C function somecfunc.
Ben