hoelzro / pluto

Heavy Duty Persistence for Lua
http://luaforge.net/projects/pluto/
81 stars 11 forks source link

fix #10. Don't put simple values in reftbl. #11

Closed wtholliday closed 12 years ago

wtholliday commented 12 years ago

There is no need to put simple values (nil, numbers, booleans, lightuserdata) in the ref-table because they are pass-by-value in Lua. This reduces ref-table lookups and allows NaN values to be persisted. Previously, pluto would attempt to insert a NaN as a key in the ref-table (inserting NaNs as table keys results in a Lua error).

hoelzro commented 12 years ago

Much appreciated!