*/
static struct { char type; char *name; } magic_names[] = {
- PERL_MAGIC_sv, "sv(\\0)",
- PERL_MAGIC_arylen, "arylen(#)",
- PERL_MAGIC_glob, "glob(*)",
- PERL_MAGIC_pos, "pos(.)",
- PERL_MAGIC_backref, "backref(<)",
- PERL_MAGIC_overload, "overload(A)",
- PERL_MAGIC_bm, "bm(B)",
- PERL_MAGIC_regdata, "regdata(D)",
- PERL_MAGIC_env, "env(E)",
- PERL_MAGIC_isa, "isa(I)",
- PERL_MAGIC_dbfile, "dbfile(L)",
- PERL_MAGIC_tied, "tied(P)",
- PERL_MAGIC_sig, "sig(S)",
- PERL_MAGIC_uvar, "uvar(U)",
- PERL_MAGIC_overload_elem, "overload_elem(a)",
- PERL_MAGIC_overload_table, "overload_table(c)",
- PERL_MAGIC_regdatum, "regdatum(d)",
- PERL_MAGIC_envelem, "envelem(e)",
- PERL_MAGIC_fm, "fm(f)",
- PERL_MAGIC_regex_global, "regex_global(g)",
- PERL_MAGIC_isaelem, "isaelem(i)",
- PERL_MAGIC_nkeys, "nkeys(k)",
- PERL_MAGIC_dbline, "dbline(l)",
- PERL_MAGIC_mutex, "mutex(m)",
- PERL_MAGIC_collxfrm, "collxfrm(o)",
- PERL_MAGIC_tiedelem, "tiedelem(p)",
- PERL_MAGIC_tiedscalar, "tiedscalar(q)",
- PERL_MAGIC_qr, "qr(r)",
- PERL_MAGIC_sigelem, "sigelem(s)",
- PERL_MAGIC_taint, "taint(t)",
- PERL_MAGIC_vec, "vec(v)",
- PERL_MAGIC_substr, "substr(x)",
- PERL_MAGIC_defelem, "defelem(y)",
- PERL_MAGIC_ext, "ext(~)",
- 0, 0 /* this null string terminates the list */
+ { PERL_MAGIC_sv, "sv(\\0)" },
+ { PERL_MAGIC_arylen, "arylen(#)" },
+ { PERL_MAGIC_glob, "glob(*)" },
+ { PERL_MAGIC_pos, "pos(.)" },
+ { PERL_MAGIC_backref, "backref(<)" },
+ { PERL_MAGIC_overload, "overload(A)" },
+ { PERL_MAGIC_bm, "bm(B)" },
+ { PERL_MAGIC_regdata, "regdata(D)" },
+ { PERL_MAGIC_env, "env(E)" },
+ { PERL_MAGIC_isa, "isa(I)" },
+ { PERL_MAGIC_dbfile, "dbfile(L)" },
+ { PERL_MAGIC_tied, "tied(P)" },
+ { PERL_MAGIC_sig, "sig(S)" },
+ { PERL_MAGIC_uvar, "uvar(U)" },
+ { PERL_MAGIC_overload_elem, "overload_elem(a)" },
+ { PERL_MAGIC_overload_table, "overload_table(c)" },
+ { PERL_MAGIC_regdatum, "regdatum(d)" },
+ { PERL_MAGIC_envelem, "envelem(e)" },
+ { PERL_MAGIC_fm, "fm(f)" },
+ { PERL_MAGIC_regex_global, "regex_global(g)" },
+ { PERL_MAGIC_isaelem, "isaelem(i)" },
+ { PERL_MAGIC_nkeys, "nkeys(k)" },
+ { PERL_MAGIC_dbline, "dbline(l)" },
+ { PERL_MAGIC_mutex, "mutex(m)" },
+ { PERL_MAGIC_collxfrm, "collxfrm(o)" },
+ { PERL_MAGIC_tiedelem, "tiedelem(p)" },
+ { PERL_MAGIC_tiedscalar, "tiedscalar(q)" },
+ { PERL_MAGIC_qr, "qr(r)" },
+ { PERL_MAGIC_sigelem, "sigelem(s)" },
+ { PERL_MAGIC_taint, "taint(t)" },
+ { PERL_MAGIC_vec, "vec(v)" },
+ { PERL_MAGIC_substr, "substr(x)" },
+ { PERL_MAGIC_defelem, "defelem(y)" },
+ { PERL_MAGIC_ext, "ext(~)" },
+ /* this null string terminates the list */
+ { 0, 0 },
};
void
int compat = 1;
if (uc >= 0x100 ||
- !(data->start_class->flags & (ANYOF_CLASS | ANYOF_LOCALE))
+ (!(data->start_class->flags & (ANYOF_CLASS | ANYOF_LOCALE))
&& !ANYOF_BITMAP_TEST(data->start_class, uc)
&& (!(data->start_class->flags & ANYOF_FOLD)
|| !ANYOF_BITMAP_TEST(data->start_class, PL_fold[uc])))
+ )
compat = 0;
ANYOF_CLASS_ZERO(data->start_class);
ANYOF_BITMAP_ZERO(data->start_class);
int compat = 1;
if (uc >= 0x100 ||
- !(data->start_class->flags & (ANYOF_CLASS | ANYOF_LOCALE))
+ (!(data->start_class->flags & (ANYOF_CLASS | ANYOF_LOCALE))
&& !ANYOF_BITMAP_TEST(data->start_class, uc)
- && !ANYOF_BITMAP_TEST(data->start_class, PL_fold[uc]))
+ && !ANYOF_BITMAP_TEST(data->start_class, PL_fold[uc])))
compat = 0;
ANYOF_CLASS_ZERO(data->start_class);
ANYOF_BITMAP_ZERO(data->start_class);
{
register regnode *ret = 0;
I32 flags;
- char *parse_start = RExC_parse;
*flagp = WORST; /* Tentatively. */
bool need_class = 0;
SV *listsv;
register char *e;
- char *parse_start = RExC_parse; /* MJD */
UV n;
bool optimize_invert = TRUE;
/* optimize case-insensitive simple patterns (e.g. /[a-z]/i) */
if (!SIZE_ONLY &&
- (ANYOF_FLAGS(ret) &
/* If the only flag is folding (plus possibly inversion). */
- (ANYOF_FLAGS_ALL ^ ANYOF_INVERT) == ANYOF_FOLD)) {
+ ((ANYOF_FLAGS(ret) & (ANYOF_FLAGS_ALL ^ ANYOF_INVERT)) == ANYOF_FOLD)
+ ) {
for (value = 0; value < 256; ++value) {
if (ANYOF_BITMAP_TEST(ret, value)) {
IV fold = PL_fold[value];