walkoptree(pTHX_ SV *opsv, char *method)
{
dSP;
- OP *o;
+ OP *o, *kid;
dMY_CXT;
if (!SvROK(opsv))
PUTBACK;
perl_call_method(method, G_DISCARD);
if (o && (o->op_flags & OPf_KIDS)) {
- OP *kid;
for (kid = ((UNOP*)o)->op_first; kid; kid = kid->op_sibling) {
/* Use the same opsv. Rely on methods not to mess it up. */
sv_setiv(newSVrv(opsv, cc_opclassname(aTHX_ kid)), PTR2IV(kid));
walkoptree(aTHX_ opsv, method);
}
}
+ if (o && (cc_opclass(aTHX_ o) == OPc_PMOP)
+ && (kid = cPMOPo->op_pmreplroot))
+ {
+ sv_setiv(newSVrv(opsv, opclassnames[OPc_PMOP]), PTR2IV(kid));
+ walkoptree(aTHX_ opsv, method);
+ }
}
typedef OP *B__OP;
#define B_main_cv() PL_main_cv
#define B_init_av() PL_initav
+#define B_check_av() PL_checkav_save
#define B_begin_av() PL_beginav_save
#define B_end_av() PL_endav
#define B_main_root() PL_main_root
B_init_av()
B::AV
+B_check_av()
+
+B::AV
B_begin_av()
B::AV
CODE:
sv_setpvn(sv, "PL_ppaddr[OP_", 13);
sv_catpv(sv, PL_op_name[o->op_type]);
- for (i=13; i<SvCUR(sv); ++i)
+ for (i=13; (STRLEN)i < SvCUR(sv); ++i)
SvPVX(sv)[i] = toUPPER(SvPVX(sv)[i]);
sv_catpv(sv, "]");
ST(0) = sv;
#endif
-U16
+U32
PMOP_pmflags(o)
B::PMOP o
-U16
+U32
PMOP_pmpermflags(o)
B::PMOP o