lua-users home
lua-l archive

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


Okay, I'll give that a try.

I also found the position in LuaBind's open function where the metatables are created. 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

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?

Big Thanks,
Stefan


Ben Sunshine-Hill wrote:
It should be as easy as using lua_getmetatable() on one of the
objects, and putting the resultant table in the permanents table; all
objects of that class most likely use the same metatable. This is
slightly hackish, since technically it should be possible to grab the
metatable from the LuaBind class registry, but I'm familiar enough
with LuaBind to know how to do that.

Ben

On 5/15/05, Stefan Schwarzbach <Schwarzbach@silentdreams.de> wrote: