[Python-checkins] r46095 - python/trunk/Objects/unicodeobject.c

Neal Norwitz nnorwitz at gmail.com
Wed May 24 08:18:35 CEST 2006


start and end look like they should be Py_ssize_t's.

On 5/23/06, fredrik.lundh <python-checkins at python.org> wrote:
> Author: fredrik.lundh
> Date: Tue May 23 12:12:21 2006
> New Revision: 46095
>
> Modified:
>    python/trunk/Objects/unicodeobject.c
> Log:
> needforspeed: fixed unicode "in" operator to use same implementation
> approach as find/index
>
>
>
> Modified: python/trunk/Objects/unicodeobject.c
> ==============================================================================
> --- python/trunk/Objects/unicodeobject.c        (original)
> +++ python/trunk/Objects/unicodeobject.c        Tue May 23 12:12:21 2006
> +    } else {
> +        int start = 0;
> +       int end = PyUnicode_GET_SIZE(u) - size;
> +        for (; start <= end; start++)
> +            if (Py_UNICODE_MATCH(u, start, v)) {
> +                result = 1;
> +                break;
> +            }


More information about the Python-checkins mailing list