On Thursday 16 March 2006 10:32 am, Tomas wrote: > > Does anyone know if you can transfer (seamlessly) a variable or table > > across LUA states? > > No. But you can transfer some types of values using the C API. > .... > > Take a look at Rings library: > > http://www.keplerproject.org/rings/ unfortunately, it only copies primitive values, not tables. a somewhat more complete solution would be to use Pluto (http://luaforge.net/projects/pluto/), to mangle a complex structure into a string and then transfer that. a nice optimisation would be to add new writer/reader functions to Pluto that do the inter-state transfer. it still would be several copies, but might be worth the try. even better would be if lua_xmove() could work across separate states. of course the naive implementation would hopelessly confuse the two garbage collectors. maybe a full working interstate lua_xmove() would be as heavy as Pluto... -- Javier
Attachment:
pgpa_LZ14PVfy.pgp
Description: PGP signature