toke.c: Add assertion to feature_is_enabled
authorFather Chrysostomos <sprout@cpan.org>
Fri, 23 Dec 2011 16:21:45 +0000 (08:21 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Dec 2011 17:25:20 +0000 (09:25 -0800)
This should now only be called by macros in feature.h when PL_hints
indicates that %^H is where the features are.

toke.c

diff --git a/toke.c b/toke.c
index 90e0b26..c6e0097 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -608,6 +608,8 @@ Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen)
 
     PERL_ARGS_ASSERT_FEATURE_IS_ENABLED;
 
+    assert(CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM);
+
     if (namelen > MAX_FEATURE_LEN)
        return FALSE;
     memcpy(&he_name[8], name, namelen);