mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Make strtok benchmark competive.
We include a generic version of strtok to result which could be faster when underlying primitives are better optimized than current version.
This commit is contained in:
@@ -22,6 +22,10 @@ static char *olds;
|
||||
|
||||
#undef strtok
|
||||
|
||||
#ifndef STRTOK
|
||||
# define STRTOK strtok
|
||||
#endif
|
||||
|
||||
/* Parse S into tokens separated by characters in DELIM.
|
||||
If S is NULL, the last string strtok() was called with is
|
||||
used. For example:
|
||||
@@ -32,7 +36,7 @@ static char *olds;
|
||||
// s = "abc\0=-def\0"
|
||||
*/
|
||||
char *
|
||||
strtok (s, delim)
|
||||
STRTOK (s, delim)
|
||||
char *s;
|
||||
const char *delim;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user