On Aug 27, 2015 7:14 AM, <[email protected]> wrote:
>
> Author: icing
> Date: Thu Aug 27 12:13:59 2015
> New Revision: 1698133
>
> URL: http://svn.apache.org/r1698133
> Log:
> giving ap_array_index a start parameter, adding ap_array_contains
>

>   */
> -AP_DECLARE(int) ap_array_index(const apr_array_header_t *array, const
char *s);
> +AP_DECLARE(int) ap_array_index(const apr_array_header_t *array,
> +                               const char *s,
> +                               apr_size_t start);

You want the type of rv of _index to correspond to the start input to rv,
no?  E.g.

int n = -1, count = 0;
while ((n = ap_array_index(arr, findtag, n + 1)) >= 0)
    ++count;

sizeof(int) does not have to equal sizeof(apr_size_t).  But for indexes I
believe it's fine.  The alternative is apr_ssize_t for both start arg and
rv.

Reply via email to