#endif
"B::IV",
"B::NV",
+#if PERL_VERSION <= 10
"B::RV",
+#endif
"B::PV",
"B::PVIV",
"B::PVNV",
#if PERL_VERSION <= 8
"B::BM",
#endif
+#if PERL_VERSION >= 11
+ "B::ORANGE",
+#endif
#if PERL_VERSION >= 9
"B::GV",
#endif
}
}
if (o && (cc_opclass(aTHX_ o) == OPc_PMOP) && o->op_type != OP_PUSHRE
- && (kid = cPMOPo->op_pmreplroot))
+#if PERL_VERSION >= 9
+ && (kid = cPMOPo->op_pmreplrootu.op_pmreplroot)
+#else
+ && (kid = cPMOPo->op_pmreplroot)
+#endif
+ )
{
sv_setiv(newSVrv(opsv, cc_opclassname(aTHX_ kid)), PTR2IV(kid));
walkoptree(aTHX_ opsv, method);
specialsv_list[5] = (SV *) pWARN_NONE;
specialsv_list[6] = (SV *) pWARN_STD;
#if PERL_VERSION <= 8
-# define CVf_ASSERTION 0
# define OPpPAD_STATE 0
#endif
#include "defsubs.h"
#define OP_type(o) o->op_type
#if PERL_VERSION >= 9
# define OP_opt(o) o->op_opt
-# define OP_static(o) o->op_static
#else
# define OP_seq(o) o->op_seq
#endif
OP_opt(o)
B::OP o
-U8
-OP_static(o)
- B::OP o
-
#else
U16
OUTPUT:
RETVAL
-#define PMOP_pmreplroot(o) o->op_pmreplroot
#if PERL_VERSION >= 9
# define PMOP_pmreplstart(o) o->op_pmstashstartu.op_pmreplstart
#else
# define PMOP_pmreplstart(o) o->op_pmreplstart
+# define PMOP_pmpermflags(o) o->op_pmpermflags
+# define PMOP_pmdynflags(o) o->op_pmdynflags
#endif
#define PMOP_pmnext(o) o->op_pmnext
#define PMOP_pmregexp(o) PM_GETRE(o)
MODULE = B PACKAGE = B::PMOP PREFIX = PMOP_
+#if PERL_VERSION <= 8
+
void
PMOP_pmreplroot(o)
B::PMOP o
root = o->op_pmreplroot;
/* OP_PUSHRE stores an SV* instead of an OP* in op_pmreplroot */
if (o->op_type == OP_PUSHRE) {
-#ifdef USE_ITHREADS
+# ifdef USE_ITHREADS
sv_setiv(ST(0), INT2PTR(PADOFFSET,root) );
-#else
+# else
sv_setiv(newSVrv(ST(0), root ?
svclassnames[SvTYPE((SV*)root)] : "B::SV"),
PTR2IV(root));
-#endif
+# endif
}
else {
sv_setiv(newSVrv(ST(0), cc_opclassname(aTHX_ root)), PTR2IV(root));
}
+#else
+
+void
+PMOP_pmreplroot(o)
+ B::PMOP o
+ CODE:
+ ST(0) = sv_newmortal();
+ if (o->op_type == OP_PUSHRE) {
+# ifdef USE_ITHREADS
+ sv_setiv(ST(0), o->op_pmreplrootu.op_pmtargetoff);
+# else
+ GV *const target = o->op_pmreplrootu.op_pmtargetgv;
+ sv_setiv(newSVrv(ST(0), target ?
+ svclassnames[SvTYPE((SV*)target)] : "B::SV"),
+ PTR2IV(target));
+# endif
+ }
+ else {
+ OP *const root = o->op_pmreplrootu.op_pmreplroot;
+ sv_setiv(newSVrv(ST(0), cc_opclassname(aTHX_ root)),
+ PTR2IV(root));
+ }
+
+#endif
+
B::OP
PMOP_pmreplstart(o)
B::PMOP o
PMOP_pmflags(o)
B::PMOP o
+#if PERL_VERSION < 9
+
+U32
+PMOP_pmpermflags(o)
+ B::PMOP o
+
+U8
+PMOP_pmdynflags(o)
+ B::PMOP o
+
+#endif
+
void
PMOP_precomp(o)
B::PMOP o
if (rx)
sv_setpvn(ST(0), rx->precomp, rx->prelen);
+#if PERL_VERSION >= 9
+
void
PMOP_reflags(o)
B::PMOP o
if (rx)
sv_setuv(ST(0), rx->extflags);
+#endif
+
#define SVOP_sv(o) cSVOPo->op_sv
#define SVOP_gv(o) ((GV*)cSVOPo->op_sv)
ST(0) = sv_2mortal(newSVpvn((char *)&w, 4));
}
+
+#if PERL_VERSION >= 11
+
+B::SV
+RV(sv)
+ B::IV sv
+ CODE:
+ if( SvROK(sv) ) {
+ RETVAL = SvRV(sv);
+ }
+ else {
+ croak( "argument is not SvROK" );
+ }
+ OUTPUT:
+ RETVAL
+
+#endif
+
MODULE = B PACKAGE = B::NV PREFIX = Sv
NV
PARENT_FAKELEX_FLAGS(sv)
B::NV sv
+#if PERL_VERSION < 11
+
MODULE = B PACKAGE = B::RV PREFIX = Sv
B::SV
SvRV(sv)
B::RV sv
+#endif
+
MODULE = B PACKAGE = B::PV PREFIX = Sv
char*
OUTPUT:
RETVAL
+bool
+isGV_with_GP(gv)
+ B::GV gv
+ CODE:
+#if PERL_VERSION >= 9
+ RETVAL = isGV_with_GP(gv) ? TRUE : FALSE;
+#else
+ RETVAL = TRUE; /* In 5.8 and earlier they all are. */
+#endif
+ OUTPUT:
+ RETVAL
+
void*
GvGP(gv)
B::GV gv
IoBOTTOM_GV(io)
B::IO io
+#if PERL_VERSION <= 8
+
short
IoSUBPROCESS(io)
B::IO io
+#endif
+
bool
IsSTD(io,name)
B::IO io