else if (strEQ(mg->mg_ptr+1, "ARNING_BITS")) {
if ( ! (PL_dowarn & G_WARN_ALL_MASK)) {
if (!SvPOK(sv)) {
- free_and_set_cop_warnings(PL_compiling, pWARN_STD);
+ free_and_set_cop_warnings(&PL_compiling, pWARN_STD);
break;
}
{
not_all |= ptr[i] ^ 0x55;
}
if (!not_none) {
- free_and_set_cop_warnings(PL_compiling, pWARN_NONE);
+ free_and_set_cop_warnings(&PL_compiling, pWARN_NONE);
} else if (len >= WARNsize && !not_all) {
- free_and_set_cop_warnings(PL_compiling, pWARN_ALL);
+ free_and_set_cop_warnings(&PL_compiling, pWARN_ALL);
PL_dowarn |= G_WARN_ONCE ;
}
else {
}
}
- free_and_set_cop_warnings(PL_compiling, NULL);
+ free_and_set_cop_warnings(&PL_compiling, NULL);
cophh_free(CopHINTHASH_get(&PL_compiling));
CopHINTHASH_set(&PL_compiling, cophh_new_empty());
CopFILE_free(&PL_compiling);
return s;
case 'W':
PL_dowarn = G_WARN_ALL_ON|G_WARN_ON;
- free_and_set_cop_warnings(PL_compiling, pWARN_ALL);
+ free_and_set_cop_warnings(&PL_compiling, pWARN_ALL);
s++;
return s;
case 'X':
PL_dowarn = G_WARN_ALL_OFF;
- free_and_set_cop_warnings(PL_compiling, pWARN_NONE);
+ free_and_set_cop_warnings(&PL_compiling, pWARN_NONE);
s++;
return s;
case '*':
#define DUP_WARNINGS(p) Perl_dup_warnings(aTHX_ p)
#define free_and_set_cop_warnings(cmp,w) STMT_START { \
- if (!specialWARN(cmp.cop_warnings)) PerlMemShared_free(cmp.cop_warnings); \
- cmp.cop_warnings = w; \
+ if (!specialWARN((cmp)->cop_warnings)) PerlMemShared_free((cmp)->cop_warnings); \
+ (cmp)->cop_warnings = w; \
} STMT_END
/*
case SAVEt_COMPILE_WARNINGS:
a0 = ap[0];
- free_and_set_cop_warnings(PL_compiling, (STRLEN*) a0.any_ptr);
+ free_and_set_cop_warnings(&PL_compiling, (STRLEN*) a0.any_ptr);
break;
case SAVEt_PARSER:
static void
S_restore_cop_warnings(pTHX_ void *p)
{
- COP curcop = *PL_curcop;
- free_and_set_cop_warnings(curcop, (STRLEN*) p);
+ free_and_set_cop_warnings(PL_curcop, (STRLEN*) p);
}
#define DUP_WARNINGS(p) Perl_dup_warnings(aTHX_ p)
#define free_and_set_cop_warnings(cmp,w) STMT_START { \
- if (!specialWARN(cmp.cop_warnings)) PerlMemShared_free(cmp.cop_warnings); \
- cmp.cop_warnings = w; \
+ if (!specialWARN((cmp)->cop_warnings)) PerlMemShared_free((cmp)->cop_warnings); \
+ (cmp)->cop_warnings = w; \
} STMT_END
/*