This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Fix more alignment problems
authorKarl Williamson <public@khwilliamson.com>
Tue, 18 Feb 2014 17:24:31 +0000 (10:24 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 19 Feb 2014 15:32:59 +0000 (08:32 -0700)
commit1ee208c4824a2a3a18e979873141161c149a57a3
tree8a1fc013840b03cc2a807679cfb3d4a773d036b4
parent77d654fbc7477bd2bbb8741fcbb08e9b541f53e3
regcomp.c: Fix more alignment problems

I believe this will fix the remaining alignment problems recently being
shown on gcc on HP-UX, It works on the procura machine.

regnodes should not have stricter alignment than required by U32, for
reasons given in the comments this commit adds to the beginning of
regcomp.h.  Commit 31f05a37 added a new ANYOF regnode struct with a
pointer field.  This requires stricter alignment on some 64-bit platforms,
and hence doesn't work on those platforms.

This commit removes that regnode struct type, and instead stores the
pointer it used via a more indirect, but already existing mechanism
that stores other data..

The function that returns that other data is enlarged to return this new
field as well.  It now needs to be called from regcomp.c, so the
previous commit had renamed and made it accessible from there.  The
"public" function that wraps this one is unchanged.  (I put "public" in
quotes here, because I don't think anyone outside core is or should be
using it, but since it has been publicly available for a long time, I'm
treating the API as unchangeable.  regcomp.c called this public function
before this commit, but needs the additional data returned by the inner
one).
embed.fnc
embed.h
perl.h
proto.h
regcomp.c
regcomp.h
regexec.c