summaryrefslogtreecommitdiff
path: root/numeric.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 /numeric.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 'numeric.c')
-rw-r--r--numeric.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/numeric.c b/numeric.c
index 2b4d68ddba..bfe67427a6 100644
--- a/numeric.c
+++ b/numeric.c
@@ -176,9 +176,8 @@ Perl_grok_bin(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
continue;
}
/* Bah. We're just overflowed. */
- if (ckWARN_d(WARN_OVERFLOW))
- Perl_warner(aTHX_ packWARN(WARN_OVERFLOW),
- "Integer overflow in binary number");
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_OVERFLOW),
+ "Integer overflow in binary number");
overflowed = TRUE;
value_nv = (NV) value;
}
@@ -294,9 +293,8 @@ Perl_grok_hex(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
continue;
}
/* Bah. We're just overflowed. */
- if (ckWARN_d(WARN_OVERFLOW))
- Perl_warner(aTHX_ packWARN(WARN_OVERFLOW),
- "Integer overflow in hexadecimal number");
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_OVERFLOW),
+ "Integer overflow in hexadecimal number");
overflowed = TRUE;
value_nv = (NV) value;
}
@@ -395,9 +393,8 @@ Perl_grok_oct(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
continue;
}
/* Bah. We're just overflowed. */
- if (ckWARN_d(WARN_OVERFLOW))
- Perl_warner(aTHX_ packWARN(WARN_OVERFLOW),
- "Integer overflow in octal number");
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_OVERFLOW),
+ "Integer overflow in octal number");
overflowed = TRUE;
value_nv = (NV) value;
}