#if PERL_VERSION < 8
if (realpack && *realpack == 'R' && strEQ(realpack, "Regexp"))
#elif PERL_VERSION < 11
- if (realpack && realtype == SVt_PVMG && mg_find(sv, PERL_MAGIC_qr))
+ if (realpack && realtype == SVt_PVMG && mg_find(ival, PERL_MAGIC_qr))
#else
if (realpack && realtype == SVt_REGEXP)
#endif