summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-12 16:39:02 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-12 16:39:02 +0100
commit9b38784150c0aca5746105b5f00bfc653322bcd1 (patch)
tree48457d0d7c2cf65438740ec90bf3382203837dba /utf8.c
parenta2a5de9516c1b256b060768ac6dad252a3aa3be7 (diff)
downloadperl-9b38784150c0aca5746105b5f00bfc653322bcd1.tar.gz
Add Perl_ck_warner_d(), which combines Perl_ckwarn_d() and Perl_warner().
Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code size for 1 more function call if warnings are not enabled.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/utf8.c b/utf8.c
index c154fdb9ba..7b7fd5712f 100644
--- a/utf8.c
+++ b/utf8.c
@@ -731,13 +731,11 @@ Perl_utf8_length(pTHX_ const U8 *s, const U8 *e)
if (e != s) {
len--;
warn_and_return:
- if (ckWARN_d(WARN_UTF8)) {
- if (PL_op)
- Perl_warner(aTHX_ packWARN(WARN_UTF8),
- "%s in %s", unees, OP_DESC(PL_op));
- else
- Perl_warner(aTHX_ packWARN(WARN_UTF8), unees);
- }
+ if (PL_op)
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8),
+ "%s in %s", unees, OP_DESC(PL_op));
+ else
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_UTF8), unees);
}
return len;