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

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

Date: Wed, 06 Aug 2014 10:43:33 -0300

To: Austin Clements, notmuch@notmuchmail.org

Cc:

From: David Bremner


Austin Clements <amdragon@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

Thread: