Re: libc/regex: const'r'us

2020-12-31 Thread Todd C . Miller
All three committed, thanks. - todd

Re: libc/regex: const'r'us

2020-12-31 Thread Todd C . Miller
On Thu, 31 Dec 2020 07:27:49 +, Miod Vallat wrote: > Spencer's code was written before const was a thing, but we can do > better. Neither regcomp(3) nor regex(3) modify the strings they are > being passed, so we can keep internal pointers as const as well and > avoid {dub,spur}ious casts. > >

libc/regex: const'r'us

2020-12-30 Thread Miod Vallat
Spencer's code was written before const was a thing, but we can do better. Neither regcomp(3) nor regex(3) modify the strings they are being passed, so we can keep internal pointers as const as well and avoid {dub,spur}ious casts. While there, the temporary array in nonnewline() can be made static