On Sat, 22 Nov 2014, Maël Hörz wrote:
> Hello,
>
> I would like to search really big arrays (bigger than 4GiB). I noticed that
> PCRE uses int frequently which will not expand to 64 bits on Win64 but stay 32
> bit. (Same holds true for x64 Linux.)
>
> For example this key function:
>
> pcre_exec(const pcre *argument_re, const pcre_extra *extra_data, PCRE_SPTR
> subject, int length, int start_offset, int options, int *offsets, int
> offsetcount)
>
> length, start_offset, offsets are all of type int/array of ints.
>
> Is there any chance those data types could be changed to automatically expand
> to 64-bit were necessary to handle 64-bit subjects?
What a well-timed question! I am about to release a Release Candidate
for PCRE2 version 10.00, which is the first test release for an entirely
new API for PCRE. In the new API, lengths and offsets are all of type
PCRE2_SIZE, which is currently defined as size_t.
There are just a few final tests I want to do before putting out the
test release, probably sometime tomorrow. It will be announced here. If
you want to look at it before then, you can get the code from the SVN
repository: