X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/eba7d13f11e851f54665751ff1204ffbbcbb3e23..6146d9e1c87d449f5c7e9c953a2e9051e32b1696:/cv.h diff --git a/cv.h b/cv.h index 5e69ef5..ebbdd36 100644 --- a/cv.h +++ b/cv.h @@ -71,7 +71,7 @@ See L. &(((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_padlist_u.xcv_padlist))) /* CvPADLIST_set is not public API, it can be removed one day, once stabilized */ #ifdef DEBUGGING -# define CvPADLIST_set(sv, padlist) Perl_set_padlist(aTHX_ (CV*)sv, padlist) +# define CvPADLIST_set(sv, padlist) Perl_set_padlist((CV*)sv, padlist) #else # define CvPADLIST_set(sv, padlist) (CvPADLIST(sv) = (padlist)) #endif @@ -134,9 +134,10 @@ See L. #define CVf_HASEVAL 0x4000 /* contains string eval */ #define CVf_NAMED 0x8000 /* Has a name HEK */ #define CVf_LEXICAL 0x10000 /* Omit package from name */ +#define CVf_ANONCONST 0x20000 /* :const - create anonconst op */ /* This symbol for optimised communication between toke.c and op.c: */ -#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LVALUE) +#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LVALUE|CVf_ANONCONST) #define CvCLONE(cv) (CvFLAGS(cv) & CVf_CLONE) #define CvCLONE_on(cv) (CvFLAGS(cv) |= CVf_CLONE) @@ -219,6 +220,10 @@ See L. #define CvLEXICAL_on(cv) (CvFLAGS(cv) |= CVf_LEXICAL) #define CvLEXICAL_off(cv) (CvFLAGS(cv) &= ~CVf_LEXICAL) +#define CvANONCONST(cv) (CvFLAGS(cv) & CVf_ANONCONST) +#define CvANONCONST_on(cv) (CvFLAGS(cv) |= CVf_ANONCONST) +#define CvANONCONST_off(cv) (CvFLAGS(cv) &= ~CVf_ANONCONST) + /* Flags for newXS_flags */ #define XS_DYNAMIC_FILENAME 0x01 /* The filename isn't static */ @@ -259,7 +264,7 @@ There is a further complication with non-closure anonymous subs (i.e. those that do not refer to any lexicals outside that sub). In this case, the anonymous prototype is shared rather than being cloned. This has the consequence that the parent may be freed while there are still active -children, eg +children, I, BEGIN { $a = sub { eval '$x' } } @@ -305,11 +310,5 @@ typedef OP *(*Perl_call_checker)(pTHX_ OP *, GV *, SV *); #endif /* - * Local variables: - * c-indentation-style: bsd - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * * ex: set ts=8 sts=4 sw=4 et: */