develooper Front page | perl.perl5.porters | Postings from April 2007

RE: Proposed changes and to regular expression interfaces in core

Thread Previous | Thread Next
From:
Jan Dubois
Date:
April 10, 2007 12:43
Subject:
RE: Proposed changes and to regular expression interfaces in core
Message ID:
028301c77ba8$71798520$546c8f60$@com
On Tue, 10 Apr 2007, Ævar Arnfjörð Bjarmason wrote:
> I32 is also used for functions such as Perl_reg_numbered_buff_fetch()
> which take a I32 paren argument indicating what capture buffer should
> be retrived. -2 is used for $`, -1 for $' and 0 for $&. This limits
> the number of capture vars to around 2**32/2.

That is not really a limitation, as Perl arrays are limited in the same
way (e.g. av_fetch() uses an I32 as the index, and negative values index
from the end).

I once tried to change Perl APIs to make everything 64-bit clean,
but gave up because I eventually end up replacing every I32 with
an IV, except for the few that just carry flags.  For example
even the magic structure has an I32 mg_len, which would need to
become an IV for tied hashes etc.

Cheers,
-Jan


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About