develooper Front page | perl.perl5.porters | Postings from July 2010

[PATCH] [perl #76586] for regex modifiers

Thread Next
karl williamson
July 28, 2010 09:38
[PATCH] [perl #76586] for regex modifiers
Message ID:
This patch seems to be warnocked, so I'm trying again, changing the 
subject line to hopefully attract more interest.  I had held off 
submitting it late in 5.13.3 to early 5.13.4 at the release manager's 
request because I thought it would break binary compatibility.  But now 
we are well into the new cycle; I wouldn't want to miss this cycle too. 
  I ended up splitting the patch so that the part I'm currently 
submitting doesn't break binary compatibility; that part is yet to come.

This patch is the first step in trying to add new regex modifiers, and 
then fix Unicode handling in regexes.

The commits still apply cleanly.  A rebased version is at github
branch match_sw

Currently the structures in op.h and regexp.h share common values, which
manually must be kept in sync.  This patch creates a new header with
those common values that is #included from the two affected header
files.  There are commits for ancillary small bug fixes and added
comments I did as I went along.

I'm not sure if this common header is the best way to approach the 
matter, but it works.  I'm open to other ideas.

I left the two different symbols for each value because I
wasn't sure what to do with them, since they are both exported by B, and
I presume that means that external programs may be depending on them.  I
see that B has some explicit definitions for backward compatibility, so
I'm thinking it would be better to remove the duplicate symbols in the
core, and then define them there for external programs.  But I don't
know enough to know if that is reasonable or not.  Please advise me.

It was most convenient to change the definitions to use eg., 1<<2
instead of 0x4.  That meant I had to change the code that reads and
evals those definitions to understand the left shift syntax.

I went out of the way to ensure binary compatibility with this patch.
The actual bit structures haven't changed.  Once a version of this is
installed, it will be easy to move things around to make room for the
new bits needed.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About