summaryrefslogtreecommitdiff
path: root/cv.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-28 12:55:56 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-15 06:19:31 -0700
commit5bb151a5298022b008a5ed5db02fc631824f2670 (patch)
treee76a9317b3992edf010550c8d7c0b54b49864a3d /cv.h
parentbdab7676902d2f95f6fad47110f6e94e386db556 (diff)
downloadperl-5bb151a5298022b008a5ed5db02fc631824f2670.tar.gz
Add CVf_LEXICAL flag
Lexical subs will use this instead of CvNAMED to indicate that the name should not include the package.
Diffstat (limited to 'cv.h')
-rw-r--r--cv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cv.h b/cv.h
index 36afba7ee8..21445b52f0 100644
--- a/cv.h
+++ b/cv.h
@@ -104,6 +104,7 @@ See L<perlguts/Autoloading with XSUBs>.
#define CVf_AUTOLOAD 0x2000 /* SvPVX contains AUTOLOADed sub name */
#define CVf_HASEVAL 0x4000 /* contains string eval */
#define CVf_NAMED 0x8000 /* Has a name HEK */
+#define CVf_LEXICAL 0x10000 /* Omit package from name */
/* This symbol for optimised communication between toke.c and op.c: */
#define CVf_BUILTIN_ATTRS (CVf_METHOD|CVf_LVALUE)
@@ -185,6 +186,10 @@ See L<perlguts/Autoloading with XSUBs>.
#define CvNAMED_on(cv) (CvFLAGS(cv) |= CVf_NAMED)
#define CvNAMED_off(cv) (CvFLAGS(cv) &= ~CVf_NAMED)
+#define CvLEXICAL(cv) (CvFLAGS(cv) & CVf_LEXICAL)
+#define CvLEXICAL_on(cv) (CvFLAGS(cv) |= CVf_LEXICAL)
+#define CvLEXICAL_off(cv) (CvFLAGS(cv) &= ~CVf_LEXICAL)
+
/* Flags for newXS_flags */
#define XS_DYNAMIC_FILENAME 0x01 /* The filename isn't static */