mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
warnings.h - length guard cop_warnings bitvector checks
This commit is contained in:
parent
39cf776065
commit
f0774ef1d0
2
lib/warnings.pm
generated
2
lib/warnings.pm
generated
@ -5,7 +5,7 @@
|
||||
|
||||
package warnings;
|
||||
|
||||
our $VERSION = "1.59";
|
||||
our $VERSION = "1.60";
|
||||
|
||||
# Verify that we're called correctly so that warnings will work.
|
||||
# Can't use Carp, since Carp uses us!
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#
|
||||
# This script is normally invoked from regen.pl.
|
||||
|
||||
$VERSION = '1.59';
|
||||
$VERSION = '1.60';
|
||||
|
||||
BEGIN {
|
||||
require './regen/regen_lib.pl';
|
||||
@ -569,8 +569,13 @@ sub warnings_h_boilerplate_2 { return <<'EOM'; }
|
||||
#define isLEXWARN_off \
|
||||
cBOOL(!PL_curcop || PL_curcop->cop_warnings == pWARN_STD)
|
||||
#define isWARN_ONCE (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
|
||||
#define isWARN_on(c,x) (PerlWarnIsSet_((U8 *)(c + 1), 2*(x)))
|
||||
#define isWARNf_on(c,x) (PerlWarnIsSet_((U8 *)(c + 1), 2*(x)+1))
|
||||
#define hasWARNBIT(c,x) ((c)[0] > (2*(x)/8))
|
||||
#define isWARN_on(c,x) (hasWARNBIT(c,x) \
|
||||
? PerlWarnIsSet_((U8 *)((c) + 1), 2*(x)) \
|
||||
: 0)
|
||||
#define isWARNf_on(c,x) (hasWARNBIT(c,x) \
|
||||
? PerlWarnIsSet_((U8 *)((c) + 1), 2*(x)+1) \
|
||||
: 0)
|
||||
|
||||
#define DUP_WARNINGS(p) Perl_dup_warnings(aTHX_ p)
|
||||
|
||||
|
||||
9
warnings.h
generated
9
warnings.h
generated
@ -141,8 +141,13 @@
|
||||
#define isLEXWARN_off \
|
||||
cBOOL(!PL_curcop || PL_curcop->cop_warnings == pWARN_STD)
|
||||
#define isWARN_ONCE (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
|
||||
#define isWARN_on(c,x) (PerlWarnIsSet_((U8 *)(c + 1), 2*(x)))
|
||||
#define isWARNf_on(c,x) (PerlWarnIsSet_((U8 *)(c + 1), 2*(x)+1))
|
||||
#define hasWARNBIT(c,x) ((c)[0] > (2*(x)/8))
|
||||
#define isWARN_on(c,x) (hasWARNBIT(c,x) \
|
||||
? PerlWarnIsSet_((U8 *)((c) + 1), 2*(x)) \
|
||||
: 0)
|
||||
#define isWARNf_on(c,x) (hasWARNBIT(c,x) \
|
||||
? PerlWarnIsSet_((U8 *)((c) + 1), 2*(x)+1) \
|
||||
: 0)
|
||||
|
||||
#define DUP_WARNINGS(p) Perl_dup_warnings(aTHX_ p)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user