PVCV is perl or XS.
p4raw-id: //depot/perl@27241
#define CvWEAKOUTSIDE_on(cv) (CvFLAGS(cv) |= CVf_WEAKOUTSIDE)
#define CvWEAKOUTSIDE_off(cv) (CvFLAGS(cv) &= ~CVf_WEAKOUTSIDE)
-
+#define CvISXSUB(cv) (CvXSUB(cv) ? TRUE : FALSE)
/*
=head1 CV reference counts and CvOUTSIDE
gv_fullname3(sv, gv, NULL);
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX_const(sv));
- if (CvXSUB(GvCV(gv)))
+ if (CvISXSUB(GvCV(gv)))
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%"UVxf" %d)\n",
PTR2UV(CvXSUB(GvCV(gv))),
(int)CvXSUBANY(GvCV(gv)).any_i32);
int levels, tots = 0, levela, tota = 0, levelas, totas = 0;
int dumpit = 0;
- if (CvXSUB(sv)) {
+ if (CvISXSUB(sv)) {
continue; /* XSUB */
}
if (!CvGV(sv)) {
"Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated",
packname, (int)len, name);
- if (CvXSUB(cv)) {
+ if (CvISXSUB(cv)) {
/* rather than lookup/init $AUTOLOAD here
* only to have the XSUB do another lookup for $AUTOLOAD
* and split that value on the last '::',
{
dVAR;
#ifdef USE_ITHREADS
- if (CvFILE(cv) && !CvXSUB(cv)) {
+ if (CvFILE(cv) && !CvISXSUB(cv)) {
/* for XSUBs CvFILE point directly to static memory; __FILE__ */
Safefree(CvFILE(cv));
}
CvFILE(cv) = 0;
#endif
- if (!CvXSUB(cv) && CvROOT(cv)) {
+ if (!CvISXSUB(cv) && CvROOT(cv)) {
if (CvDEPTH(cv))
Perl_croak(aTHX_ "Can't undef active subroutine");
ENTER;
CvCLONED_on(cv);
#ifdef USE_ITHREADS
- CvFILE(cv) = CvXSUB(proto) ? CvFILE(proto)
- : savepv(CvFILE(proto));
+ CvFILE(cv) = CvISXSUB(proto) ? CvFILE(proto)
+ : savepv(CvFILE(proto));
#else
CvFILE(cv) = CvFILE(proto);
#endif
hasargs = 0;
SPAGAIN;
- if (CvXSUB(cv)) {
+ if (CvISXSUB(cv)) {
CvDEPTH(cv)++;
PUSHMARK(SP);
(void)(*CvXSUB(cv))(aTHX_ cv);
PAD_SVl(0) = (SV*)(cx->blk_sub.argarray = av);
}
}
- else if (CvXSUB(cv)) { /* put GvAV(defgv) back onto stack */
+ else if (CvISXSUB(cv)) { /* put GvAV(defgv) back onto stack */
AV* const av = GvAV(PL_defgv);
items = AvFILLp(av) + 1;
EXTEND(SP, items+1); /* @_ could have been extended. */
/* Now do some callish stuff. */
SAVETMPS;
SAVEFREESV(cv); /* later, undo the 'avoid premature free' hack */
- if (CvXSUB(cv)) {
+ if (CvISXSUB(cv)) {
OP* retop = cx->blk_sub.retop;
if (reified) {
I32 index;
SvIV_set(dbsv, PTR2IV(cv)); /* Do it the quickest way */
}
- if (CvXSUB(cv))
+ if (CvISXSUB(cv))
PL_curcopdb = PL_curcop;
cv = GvCV(PL_DBsub);
return cv;
DIE(aTHX_ "No DB::sub routine defined");
}
- if (!(CvXSUB(cv))) {
+ if (!(CvISXSUB(cv))) {
/* This path taken at least 75% of the time */
dMARK;
register I32 items = SP - MARK;
}
}
if (!(cv && CvROOT(cv))) {
- if (cv && CvXSUB(cv)) {
+ if (cv && CvISXSUB(cv)) {
is_xsub = 1;
}
else if (gv) {
CvWEAKOUTSIDE(sstr)
? cv_dup( CvOUTSIDE(dstr), param)
: cv_dup_inc(CvOUTSIDE(dstr), param);
- if (!CvXSUB(dstr))
+ if (!CvISXSUB(dstr))
CvFILE(dstr) = SAVEPV(CvFILE(dstr));
break;
}