This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
simplify the return code in (??{})
authorDavid Mitchell <davem@iabyn.com>
Sun, 3 Jun 2012 17:05:36 +0000 (18:05 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:55 +0000 (13:32 +0100)
commite41ffe51c12c0cad6aa835df69c2ea84774bb0df
tree098673d5fd739461f29e35b06f0fde93768599c9
parent197e8e6e210c7569f577deaefd83e24f1bdb0138
simplify the return code in (??{})

In the case where (??{...}) returns a non-reference with SMG,
there are two branches: if it has GMG too, we assert it hasn't got
PERL_MAGIC_qr, thus (intentionally) making redundant the following
sv_unmagic(ret, PERL_MAGIC_qr); otherwise we mg_find(ret, PERL_MAGIC_qr)
it.

This can all be reduced to a single mg_find() with no change in code
logic.
regexec.c