| Commit message (Collapse) | Author | Files | Lines |
|
In a previous commit, adding HASH node support, this code was added
that would let both ARRAY and HASH nodes allocate an array.
The syntax was however wrong, never allocating memory and thus
failing with an INVALID_STATE when freeing.
Additionally, this begs the question how a cleanup of INVALID_STATE
could be handled (i.e. with a `goto fail` in the `bowl_free` function)
|
|
The example previously would lead to corrupt memory
when running for items that needed to re-hash the
hash array. This has been fixed.
Secondly, all HASH node memory leaks are now fixed,
that resulted from badly tracking objects through the
resize process. A new function `hash_free_shallow` was
added to help with this. The function `array_free_shallow`
is unused but might become useful in the future and so
was not removed.
The hash strategy is still garbage but this can be fixed later :)
|
|
|
|
|
|
This PR adds initial support for HASH data nodes in libbowl.
This allows a performant key-value store lookup in a node tree.
The hashing code implements the "murmur" hash, which has shown
good performance over at [`libcuckoo`]. Currently there is no
extended hashing strategy, which should definitely be changed.
[`libcuckoo`]: https://github.com/qaul/libcuckoo
(currently a collision will cause a recursive re-alloc)
Some of the type-level hacks also begs the question if a PAIR
data node might be warranted, even though it would break the
simple design around bowl->data.
|
|
This commit rewrites pretty much the entire library. It is now much
smaller and more maintainable (split over multiple files). It will now
also support more features (that aren't implemented yet).
Adding two examples to show how to use the new API. Also changing the
name of the library everywhere.
|
|
|
|
|
|
options
|
|
|
|
structure
|
|
|
|
|
|
- Now properly cleaning payload space after type reset
- Minor tweaks and improvements
|
|
|
|
|
|
|
|
Numeral elements are now called "Numeric" elements.
|
|
Fixing an error in the print function which would sometimes yield incorrect results
|
|
|
|
- Renaming the recursive field to "list" functions
- Renaming main file to dtree for less confusion
- Allowing for long values to be stored - not just integers
- Adjusting quick access functions to use new API
|
|
|
|
- Adding preliminary json encode functionality
- Adding new executable with test functions
Code needs further testing but should be functional.
|
|
|
|
|
|
|
|
- Encode a dyntree object hirarchy into json
- Decode a json string to a dyntree object hirarchy
- Split a tree in two (no longer related) sub-trees
- Merge two non-related subtrees together
|
|
- Also adding the ability to store custom pointers in a node
|
|
|