[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #4604] Fix left anchors and -w problems
From: |
Charles Levert |
Subject: |
Re: [patch #4604] Fix left anchors and -w problems |
Date: |
Wed, 9 Nov 2005 20:35:59 -0500 |
User-agent: |
Mutt/1.4.1i |
* On Wednesday 2005-11-09 at 23:08:14 +0000, Julian Foad wrote:
> Use a pointer if it
> makes the code clearer (in callers and callees). This is not an inner loop
> so code clarity is more important than speed efficiency.
I will use a pointer. I found out that to
use a pointer, I must actually recompute it in
several places. Something like:
if (start_ptr)
start_ptr = new_buf + (start_ptr - old_buf)
Normally, that would argue for using an offset
instead, except that all those places are bound
to disappear when we fix UTF-8 and match_icase
issues. I prefer to make the code that will
stay for the long run more readable, rather than
avoid these temporary adjustments.
The only place that will remain where a pointer
won't look natural is in the PCRE-calling
code, but that code is minimal in term of its
complexity since we offload all the work to
this library.
[patch #4604] Fix left anchors and -w problems, Charles Levert, 2005/11/09