mirror of
https://github.com/gvx/bitser.git
synced 2024-11-24 06:54:20 +00:00
Oops
This commit is contained in:
parent
63a512707c
commit
60006de9f0
@ -246,7 +246,6 @@ local function serialize(value)
|
|||||||
Buffer_makeBuffer(4096)
|
Buffer_makeBuffer(4096)
|
||||||
local seen = {len = 0}
|
local seen = {len = 0}
|
||||||
serialize_value(value, seen)
|
serialize_value(value, seen)
|
||||||
return buf, buf_pos
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_to_seen(value, seen)
|
local function add_to_seen(value, seen)
|
||||||
@ -357,10 +356,10 @@ end
|
|||||||
|
|
||||||
return {dumps = function(value)
|
return {dumps = function(value)
|
||||||
serialize(value)
|
serialize(value)
|
||||||
return ffi.string(buf, buf_size)
|
return ffi.string(buf, buf_pos)
|
||||||
end, dumpLoveFile = function(fname, value)
|
end, dumpLoveFile = function(fname, value)
|
||||||
serialize(value)
|
serialize(value)
|
||||||
love.filesystem.write(fname, ffi.string(buf, buf_size))
|
love.filesystem.write(fname, ffi.string(buf, buf_pos))
|
||||||
end, loadLoveFile = function(fname)
|
end, loadLoveFile = function(fname)
|
||||||
local serializedData = love.filesystem.newFileData(fname)
|
local serializedData = love.filesystem.newFileData(fname)
|
||||||
Buffer_newDataReader(serializedData:getPointer(), serializedData:getSize())
|
Buffer_newDataReader(serializedData:getPointer(), serializedData:getSize())
|
||||||
|
Loading…
Reference in New Issue
Block a user