Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
623 stars 115 forks source link

Functions accepting slices sometimes redundantly also take their length #50

Closed Not-Nik closed 1 year ago

Not-Nik commented 1 year ago

raylib functions often take an array and it's length as arguments. This is fine in C, because it doesn't have a concept of "fat-pointers", or "slices", but on the Zig side we try to map these array/length pairs to slices wherever possible.

This affects all of the following:

However, I would like to postpone further fixes until Zig 0.11.0 is released and #48 is merged, so that I don't have to maintain two branches and push everything twice.