lua-users home
lua-l archive

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


I am currently developing on a project that requires serialization of
the Lua states that I am working with. I believe that I've designed
acceptable solutions for serializing numbers, strings, tables, and
userdata, and lua_CFunction values. Lua function values present a
problem that I haven't been able to overcome yet.

Because Lua functions are first class values, serializing Lua tables and
states would be incomplete without the ability to serialize function values.

If I assume that Lua function values are stored as compiled "byte
code" that is not Lua-state dependent. If I had access to this "byte code"
buffer and a means of creating Lua function values from the byte code
buffer, I think could successfully serialize a Lua function value.

Does anyone have more information that would help me design and
implement this? Any thoughts or criticisms?

I've searched the archive and have not found a discussion about this.
Please forgive me if it has already been covered.

--
Mike Roberts
email <zoarre@bigfoot.com>