AmendHub

jcs

/

subtext

/

amendments

/

bile.h

Amendments on March 2, 2023


Amendments on March 1, 2023

bile: Add bile_ids_by_type, make bile_sorted_ids_by_type use it

Sometimes there's no point in sorting the results
jcs made amendment 327 about 1 year ago

Amendments on February 24, 2023

bile: Add bile_resize, don't zero in bile_read_alloc

We're going to fill up the buffer we just malloced with existing
data, no need to zero it before hand.
jcs made amendment 320 about 1 year ago

Amendments on February 23, 2023

bile: Make bile_write_map public

jcs made amendment 316 about 1 year ago

Amendments on February 16, 2023

bile: Add flags arg to bile_delete, make zeroing and purging optional

When deleting a bunch of records in a row, we can avoid writing out
a new map every time.
jcs made amendment 301 about 1 year ago

Amendments on November 30, 2022

bile: Fix bile_flush prototype

jcs made amendment 296 about 1 year ago

Amendments on August 3, 2022

bile: Better malloc notes

jcs made amendment 228 about 1 year ago

Amendments on July 31, 2022

bile: Pass object size to bile_unmarshall_object to check for overflow

Also add malloc annotations
jcs made amendment 225 about 1 year ago

Amendments on July 7, 2022


Amendments on June 11, 2022

bile: Bug fixes, store highest ids when deleting

The previous fix was bogus, back it out.
The "o = &bile->map[n - 1]" line seems to have been erroneously copied
and pasted (many times) from another loop where I was going
backwards :(
Implement storage of highest ids seen when deleting, so that
bile_next_id hands out 1 higher than that id. This way we won't
re-use ids of deleted things like users, posts, etc.
jcs made amendment 134 about 1 year ago

Amendments on June 9, 2022

bile: Revert in-place saves, keep 8k alignment, fix bug in bile_alloc

In bile_alloc, the initial last_pos is set to the header length, but
if there is only one object, we never add its length to last_pos.
This only happens when we have objects and then delete all of them,
leaving only the map object. Normally we'd either have 0 or 1+map.
Add canary to bile struct, verify it exists in every function so we
can check that we have a valid bile file and not a bogus pointer.
jcs made amendment 127 about 1 year ago

Amendments on June 6, 2022

bile: Sync with upstream, support in-place updates

jcs made amendment 120 about 1 year ago

Amendments on June 1, 2022

bile: Allow shallow unmarshalling

When quickly iterating over a bunch of objects, it's useful to be
able to avoid all the malloc/free of unmarshalling objects that have
dynamic-length strings
jcs made amendment 111 about 1 year ago

Amendments on March 3, 2022

bile: Add bile_sorted_ids_by_type

jcs made amendment 84 over 2 years ago

Amendments on January 29, 2022

bile: Add object marshalling

jcs made amendment 67 over 2 years ago

Amendments on January 22, 2022

bile: Sync with upstream

jcs made amendment 58 over 2 years ago

Amendments on January 14, 2022

bile: Even more API changes

jcs made amendment 50 over 2 years ago

Amendments on January 6, 2022

bile: More API changes

jcs made amendment 49 over 2 years ago

Amendments on January 5, 2022

bile: A more Unix-like API, with bile_error like errno

jcs made amendment 47 over 2 years ago

Amendments on January 4, 2022

bile: More work

jcs made amendment 46 over 2 years ago