]> git.notmuchmail.org Git - notmuch/commitdiff
util: Const version of strtok_len
authorAustin Clements <amdragon@MIT.EDU>
Fri, 1 Aug 2014 02:09:52 +0000 (22:09 -0400)
committerDavid Bremner <david@tethera.net>
Wed, 6 Aug 2014 12:56:36 +0000 (09:56 -0300)
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.


No differences found