torque 2d099d931e
start doodling some wrapper ideas
The main points of interest here is the allocator wrapper, which was
kind of annoying to implement. Since the Zig allocator interface
expects to know the size of all allocations, we have to secretly
allocate space for that in front of the pointer that we return. This
ends up causing a little bit of slightly nasty pointer manipulation. I
took longer to debug this than I would like to admit from a bug that
ended up being caused by storing a pointer to a stack copy of an
Allocator object. Whoops.

The other interesting thing I think (though much simpler) is
representing the options bitfield as a packed struct. I think this
makes initializing the parser options a lot nicer than the c variant.
2023-09-04 15:42:47 -07:00
2023-09-04 15:42:47 -07:00
2023-09-04 15:42:46 -07:00
2023-09-04 15:42:46 -07:00
2023-09-04 15:42:46 -07:00

The file is empty.
Description
No description provided
Readme 326 KiB
Languages
Zig 97.1%
C 2.9%