On 10/29/2009 09:23 AM, Jim Meyering wrote:
-           Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
> -           re_node_set_remove_at (dest_nodes, idx);
> +           Idx idx = re_node_set_contains (dest_nodes, cur_node);
> +           if (idx)
> +             re_node_set_remove_at (dest_nodes, idx - 1);

That looks like a good bug fix.

Not really a bug fix---previously you'd pass -1 and that would be ignored; with your patch you pass SIZE_MAX and the effect is the same.

Why use a signed type throughout rege*.[ch] when an unsigned one
more accurately models the data and interfaces?

Because upstream uses a signed type, and I'm not sure we want to deviate from there. I'd use intptr_t or ptrdiff_t.

Paolo


Reply via email to