Re: Serializing Lua State in use with Luabind
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Serializing Lua State in use with Luabind
- From: Stefan Schwarzbach <Schwarzbach@...>
- Date: 2005年5月15日 14:51:58 +0200
I don't know how to identify the metatable to list it in the permanent
table.
Here's the call stack from the beginning of the serialization to the
C-function problem:
persistfunction(PersistInfo_t * pi=0x0006f8f0)
persist(PersistInfo_t * pi=0x0006f8f0)
persisttable(PersistInfo_t * pi=0x0006f8f0)
persist(PersistInfo_t * pi=0x0006f8f0)
persistuserdata(PersistInfo_t * pi=0x0006f8f0)
persist(PersistInfo_t * pi=0x0006f8f0)
// Main persist table
persisttable(PersistInfo_t * pi=0x0006f8f0)
persist(PersistInfo_t * pi=0x0006f8f0)
// Start call
pluto_persist(lua_State * L=0x0e674b20, int (lua_State *, const void *,
unsigned int, void *)* writer=0x0060b615, void * ud=0x1027c8f8)
What do I have to do to identify the metatable? I don't get a name from
the that metatable, only from the class table itself and from the
function name.
Greetings,
Stefan
Ben Sunshine-Hill wrote:
Ahh, I think I know what's going on.
LuaBind is trying to store a metatable for a table, and the metatable
contains an __eq metamethod which is a C-function. Pluto, which has no
way of serializing C functions, thus fails.
Have you tried adding the metatable to the permanents table? Assuming
there's only one metatable per class, this shouldn't be much overhead,
and should work fine. Tell me if you need help with this; I'd very
much like to be aware of interactions between Pluto and binding
libraries like LuaBind.