lua-users home
lua-l archive

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



Thanks, I thought such a utility existed!

Now, the only feature missing is a Lua value stringifier (serialize/ deserialize) which I'd like to be as a C function. Anyone has such? And is there a reason why not have one built-in in Lua?

str= string.serialize( ... ) -- eats strings, numbers, booleans, tables (with recursion)
...= string.deserialize( str )

http://www.lua.org/pil/12.1.html


Mildred kirjoitti 22.2.2007 kello 3.11:


Why not somethind like :

my_chunk = string.dump(function(...)
	-- some lua code
end)

Of course you should not use upvalues.

Mildred

--
Mildred       <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG : <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/ gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]