mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
Release version 1.1
This commit is contained in:
parent
1a9f3d7631
commit
884aa8bdc6
4
USAGE.md
4
USAGE.md
@ -155,7 +155,7 @@ resource = bitser.register(name, resource)
|
||||
```
|
||||
|
||||
Registers the value `resource` with the name `name`, which has to be a unique string. Registering static resources like images,
|
||||
functions, classes and huge strings, makes sure bitser doesn't attempt to serialize them, but only stores a named
|
||||
functions, classes, huge strings and LuaJIT ctypes, makes sure bitser doesn't attempt to serialize them, but only stores a named
|
||||
reference to them.
|
||||
|
||||
Returns the registered resource as a convenience.
|
||||
@ -189,7 +189,7 @@ If not nil, the argument `classkey` should be a string such that
|
||||
If not nil, the argument `deserializer` should be a function such that `deserializer(obj, class)` returns a valid
|
||||
instance of `class` with the properties of `obj`. `deserializer` is allowed to mutate `obj`.
|
||||
|
||||
Returns the registered resource as a convenience.
|
||||
Returns the registered class as a convenience.
|
||||
|
||||
See also: [`bitser.unregisterClass`](#unregisterclass).
|
||||
|
||||
|
@ -14,6 +14,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
]]
|
||||
|
||||
local VERSION = '1.1'
|
||||
|
||||
local floor = math.floor
|
||||
local pairs = pairs
|
||||
local type = type
|
||||
@ -469,4 +471,4 @@ end, unregisterClass = function(name)
|
||||
classkey_registry[name] = nil
|
||||
class_deserialize_registry[name] = nil
|
||||
class_registry[name] = nil
|
||||
end, reserveBuffer = Buffer_prereserve, clearBuffer = Buffer_clear}
|
||||
end, reserveBuffer = Buffer_prereserve, clearBuffer = Buffer_clear, version = VERSION}
|
||||
|
Loading…
Reference in New Issue
Block a user