You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I come from another language with slices, so it's rather vexing that quiche's FFI doesn't expose string parameters as slices (pointer + length), but rather as null-terminated arrays (pointer + memory leak). This means that before sending a string slice to quiche I have to null-terminate it and pass only its pointer to quiche, only for quiche to find the null-terminator and re-slice it anyway. In other words:
I would prefer if there were alternative functions that take a pointer & length so that I don't have to do this dance. Many C libraries (including portions of the C standard library) also expect const char*s to be passed alongside a length, so I don't think it's unreasonable to expect it here.
The text was updated successfully, but these errors were encountered:
I come from another language with slices, so it's rather vexing that quiche's FFI doesn't expose string parameters as slices (pointer + length), but rather as null-terminated arrays (pointer + memory leak). This means that before sending a string slice to quiche I have to null-terminate it and pass only its pointer to quiche, only for quiche to find the null-terminator and re-slice it anyway. In other words:
I would prefer if there were alternative functions that take a pointer & length so that I don't have to do this dance. Many C libraries (including portions of the C standard library) also expect
const char*
s to be passed alongside a length, so I don't think it's unreasonable to expect it here.The text was updated successfully, but these errors were encountered: