jcrist · GitHub

added 12 commits

August 12, 2022 10:02
- Switches to using a uint64_t for a bitmask. On 64bit platforms this
shouldn't result in increased memory usage, since these types already
had to be 64 bit aligned anyway.
- Moves to using a union to contain type details, instead of a `void *`.
With these changes the TypeNode structure is now able to contain all the
constraint information we'll eventually want to encode in it.
Adds a `Meta` object for holding extra metadata for a specific TypeNode.
Also sets up framework for other constraints.
Instead of having a single callback after decoding, this moves the
type-specific checks to be called directly from the type-specific
decoding routines. This mainly speeds up numeric constraint checking,
and also allows msgpack length constraints to happen _before_ the object
is decoded.
Also fixes a bug in constraints on dict keys.

@jcrist

@jcrist

@jcrist

@jcrist

Open

Merged

Read the original on github.com ↗