diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-22 10:20:01 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-24 09:25:14 -0800 |
commit | d1fd0100b99385b1e0c84be811cacef81d01c17a (patch) | |
tree | 336307f05a9ace8090b1d73b823a8ae81ed1deec /feature.h | |
parent | 2b9e0ab72974ddabc33d92aa62d36f45b365fcf4 (diff) | |
download | perl-d1fd0100b99385b1e0c84be811cacef81d01c17a.tar.gz |
feature.h: Add macros for current hints
CURRENT_HINTS is not specific to features, but for now will be used by
nothing else. It returns the compile-time or run-time hints, depend-
ing on whether PL_curcop points to &PL_compiling.
CURRENT_FEATURE_BUNDLE extracts the feature bundle number from the
current hints.
Diffstat (limited to 'feature.h')
-rw-r--r-- | feature.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -15,6 +15,10 @@ #define FEATURE_BUNDLE_515 3 #define FEATURE_BUNDLE_CUSTOM (HINT_FEATURE_MASK >> HINT_FEATURE_SHIFT) +#define CURRENT_HINTS \ + (PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints) +#define CURRENT_FEATURE_BUNDLE (CURRENT_HINTS >> HINT_FEATURE_SHIFT) + #endif /* PERL_CORE or PERL_EXT */ /* ex: set ro: */ |