Re: [Python-Dev] [Python-checkins] cpython: Add a comment explaining this heuristic.
14 Oct
2011
14 Oct
'11
8:07 a.m.
Hi Antoine,
changeset: 701b2e0e6f3f user: Antoine Pitrou <solipsis@pitrou.net> date: Thu Oct 13 18:07:37 2011 +0200 summary: Add a comment explaining this heuristic.
diff --git a/Objects/stringlib/fastsearch.h b/Objects/stringlib/fastsearch.h --- a/Objects/stringlib/fastsearch.h +++ b/Objects/stringlib/fastsearch.h @@ -115,6 +115,9 @@ unsigned char needle; needle = p[0] & 0xff; #if STRINGLIB_SIZEOF_CHAR > 1 + /* If looking for a multiple of 256, we'd have two + many false positives looking for the '\0' byte in UCS2 + and UCS4 representations. */
I guess this should read “too many”, not “two”. Cheers
4716
Age (days ago)
4716
Last active (days ago)
0 comments
1 participants
participants (1)
-
Éric Araujo