[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] strtok_r
From: |
Paul Eggert |
Subject: |
Re: [Bug-gnulib] strtok_r |
Date: |
Thu, 11 Nov 2004 14:51:45 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
> * Is strchr the same as rawmemchr?
No, strchr (BUF, CH) stops when it finds either CH or a null byte.
rawmemchr (BUF, CH) stops only when it finds CH.
If CH is zero (which is the case here), the two functions are
equivalent, but presumably rawmemchr is faster.
> I didn't like rawmemchr.
Just as an aside, I didn't even know about rawmemchr until now. But
it looks nice to me. What don't you like about it?
> * Glibc doesn't seem to have restrict keywords in the *.c file. Is
> that a bug? Is it sufficient to have them in *.h?
C99 isn't entirely clear on the subject. I think the intent was that
it's sufficient to have them in *.h. I wouldn't worry about it unless
we run across a (possibly pre-C99) compiler that complains about it,
or unless it turns into a real performance problem.
Re: [Bug-gnulib] strtok_r,
Paul Eggert <=