[Python-Dev] [Python-checkins] cpython: Add a comment explaining this heuristic.
Éric Araujo
merwok at netwok.org
Fri Oct 14 17:07:12 CEST 2011
Hi Antoine,
> changeset: 701b2e0e6f3f
> user: Antoine Pitrou <solipsis at 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
More information about the Python-Dev
mailing list