From a2a5de9516c1b256b060768ac6dad252a3aa3be7 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 12 Oct 2009 16:06:20 +0100 Subject: Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner(). Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code size (about 0.2%), for 1 more function call if warnings are not enabled. However, if we're now in the L1 or L2 cache when we weren't previously, that's still going to be a speed win. --- proto.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'proto.h') diff --git a/proto.h b/proto.h index df73c20761..4afff50872 100644 --- a/proto.h +++ b/proto.h @@ -3702,6 +3702,12 @@ PERL_CALLCONV void Perl_warner(pTHX_ U32 err, const char* pat, ...) #define PERL_ARGS_ASSERT_WARNER \ assert(pat) +PERL_CALLCONV void Perl_ck_warner(pTHX_ U32 err, const char* pat, ...) + __attribute__format__(__printf__,pTHX_2,pTHX_3) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_CK_WARNER \ + assert(pat) + PERL_CALLCONV void Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_VWARNER \ -- cgit v1.2.1