[PATCH v3 02/13] util: Const version of strtok_len

David Bremner david at tethera.net
Wed Aug 6 06:43:33 PDT 2014


Austin Clements <amdragon at MIT.EDU> writes:

> Because of limitations in the C type system, we can't a strtok_len
> that can work on both const string and non-const strings.  The C
> library solves this by taking a const char* and returning a char*
> in functions like this (e.g., strchr), but that's not const-safe.
> Solve it by introducing strtok_len_c, a version of strtok_len for
> const strings.

pushed the first two patches in the series

d


More information about the notmuch mailing list