b2adfa9b5e1682df accidentally changed the return type from SV to B::SV.
Clearly there aren't enough tests.
However, the code prior to
b2adfa9b5e1682df was buggy (now fixed) in that it
could put a NULL on the perl stack. The stack should only be valid SV pointers.
case 8:
if (mg->mg_type == PERL_MAGIC_qr) {
REGEXP *rx = (REGEXP *)mg->mg_obj;
- PUSHs(make_sv_object(aTHX_ NULL,
- rx ? newSVpvn( RX_PRECOMP(rx), RX_PRELEN(rx))
- : NULL));
+ PUSHs(newSVpvn_flags(rx ? RX_PRECOMP(rx) : NULL,
+ rx ? RX_PRELEN(rx) : 0, SVs_TEMP));
} else {
croak( "precomp is only meaningful on r-magic" );
}