Re: [pcre-dev] Problem with a regexp

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Thomas Weber
CC: pcre-dev
Subject: Re: [pcre-dev] Problem with a regexp
On Mon, 22 Sep 2008, Thomas Weber wrote:

> > > Shouldn't this be
> > > *((unsigned long int *)where) = MATCH_LIMIT;
> >
> > I don't think so. The output is documented as being an integer.
>
> Yes, but shouldn't it match the definition of match_limit in the
> definition of the pcre_extra struct (in pcre.h)?
>
> I'm not that deep into C, so it's well possible that it doesn't make a
> difference.


Well, yes, maybe it is an untidiness. I don't think it would make any
difference on most (all?) 32-bit systems, where long int is usually the
same as int. It might affect 16-bit systems where int and long int are
different. If I changed it, it would be an incompatible change for
16-bit systems, but on the other hand, the sort of values you put in
there wouldn't fit into 16 bits anyway. So in a way it is a bug fix (for
16-bit systems).

Therefore, I think I will make the change when I next work on PCRE.

Thanks for making the point.

Philip

--
Philip Hazel