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.
#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: */
print $h <<EOH;
#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 */
EOH