summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2018-03-01 16:41:59 -0500
committerTony Cook <tony@develop-help.com>2018-03-07 14:14:15 +1100
commit814eedc877a5aa1dbba0047735733e9491aa94a4 (patch)
tree7fb1db6b7b8481e4ab0a19d8f39477adf38d0456 /doop.c
parent4d169ec9e2a0eb93170198ffad69a892f91dd199 (diff)
downloadperl-814eedc877a5aa1dbba0047735733e9491aa94a4.tar.gz
rmv/de-dup static const char array "strings"
MSVC due to a bug doesn't merge identicals between .o'es or discard these vars and their contents. MEM_WRAP_CHECK_2 has never been used outside of core according to cpan grep MEM_WRAP_CHECK_2 was removed on the "have PERL_MALLOC_WRAP" branch in commit fabdb6c0879 "pre-likely cleanup" without explination, probably bc it was unused. But MEM_WRAP_CHECK_2 was still left on the "no PERL_MALLOC_WRAP" branch, so remove it from the "no" side for tidyness since it was a mistake to leave it there if it was removed from the "yes" side of the #ifdef. Add MEM_WRAP_CHECK_s API, letter "s" means argument is string or static. This lets us get rid of the "%s" argument passed to Perl_croak_nocontext at a couple call sites since we fully control the next and only argument and its guaranteed to be a string literal. This allows merging of 2 "Out of memory during array extend" c strings by linker now. Also change the 2 op.h messages into macros which become string literals at their call sites instead of "read char * from a global char **" which was going on before. VC 2003 32b perl527.dll section size before .text name DE503 virtual size .rdata name 4B621 virtual size after .text name DE503 virtual size .rdata name 4B5D1 virtual size
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doop.c b/doop.c
index 54c7bb6ee4..54e35f10a6 100644
--- a/doop.c
+++ b/doop.c
@@ -1098,19 +1098,19 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
if (left_utf8 || right_utf8) {
if (left_utf8) {
if (right_utf8 || rightlen > leftlen) {
- Perl_croak(aTHX_ fatal_above_ff_msg, PL_op_desc[optype]);
+ Perl_croak(aTHX_ FATAL_ABOVE_FF_MSG, PL_op_desc[optype]);
}
len = rightlen;
}
else if (right_utf8) {
if (leftlen > rightlen) {
- Perl_croak(aTHX_ fatal_above_ff_msg, PL_op_desc[optype]);
+ Perl_croak(aTHX_ FATAL_ABOVE_FF_MSG, PL_op_desc[optype]);
}
len = leftlen;
}
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED),
- deprecated_above_ff_msg, PL_op_desc[optype]);
+ DEPRECATED_ABOVE_FF_MSG, PL_op_desc[optype]);
}
else { /* Neither is UTF-8 */
len = MIN(leftlen, rightlen);