aboutsummaryrefslogtreecommitdiff
path: root/bowl.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-15Fixing a memory allocation regressionKatharina Fey1-1/+2
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)
2019-07-14Various improvements around HASH nodesKatharina Fey1-2/+3
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 :)
2019-07-14Implementing HASH node `remove_key` functionKatharina Fey1-1/+14
2019-07-13Fixing simple HASH node memory leakKatharina Fey1-1/+1
2019-07-13Adding initial support for HASH nodesKatharina Fey1-3/+16
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.
2019-06-09Restructuring the main API and projectKatharina Fey1-760/+68
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.
2019-06-04Changing library name and project structureKatharina Fey1-80/+79
2019-06-04Fixed an issue where printing boolean values in a tree wouldn't workKatharina Fey1-1/+1
2019-06-04Adding support for boolean nodes as well as long long supports via compile ↵Katharina Fey1-6/+55
options
2019-06-04Fixing a bug where parent searches were always falseKatharina Fey1-1/+1
2019-06-04Adding new function that gets the parent of a current node in a recursive ↵Katharina Fey1-0/+42
structure
2019-06-04Updating lots of code to make finalisation of vault creations easierKatharina Fey1-1/+1
2019-06-04Adding new recursive key search functionKatharina Fey1-0/+75
2019-06-04- Fixing an issue where the list malloc was of size 0Katharina Fey1-4/+5
- Now properly cleaning payload space after type reset - Minor tweaks and improvements
2019-06-04No longer allow to free shallow copies of nodesKatharina Fey1-1/+3
2019-06-04Moving utility functions into new file with a new API namespaceKatharina Fey1-51/+51
2019-06-04Adding the ability to copy nodes in shallow or deep modeKatharina Fey1-10/+74
2019-06-04API refactor part 3: Recursive elements are now called "List" elements, ↵Katharina Fey1-28/+28
Numeral elements are now called "Numeric" elements.
2019-06-04Cleaning up the json decoder.Katharina Fey1-18/+20
Fixing an error in the print function which would sometimes yield incorrect results
2019-06-04More API changes deep_copy is now copy_deepKatharina Fey1-1/+1
2019-06-04API Changes.Katharina Fey1-4/+65
- 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
2016-08-23Changing formattingKatharina Fey1-19/+20
2016-08-22First release candidate for version 1.0Katharina Fey1-1/+1
- Adding preliminary json encode functionality - Adding new executable with test functions Code needs further testing but should be functional.
2016-08-21Adding recursive search functionKatharina Fey1-0/+45
2016-08-21Fixing an issue that could cause a SIGABRTKatharina Fey1-3/+3
2016-08-21Adding split and merge featuresKatharina Fey1-0/+112
2016-08-21Adding new functions to APIKatharina Fey1-1/+1
- 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
2016-07-30Changing the APi slightly and adding better comments for the api functions.Katharina Fey1-6/+49
- Also adding the ability to store custom pointers in a node
2016-07-30Initial commit of the libraryKatharina Fey1-0/+319