summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
Diffstat (limited to 'av.c')
-rw-r--r--av.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/av.c b/av.c
index f6ffea627b..918844c376 100644
--- a/av.c
+++ b/av.c
@@ -140,17 +140,13 @@ Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp,
? SSize_t_MAX : key + newmax;
resize:
{
-#ifdef PERL_MALLOC_WRAP /* Duplicated in pp_hot.c */
- static const char oom_array_extend[] =
- "Out of memory during array extend";
-#endif
/* it should really be newmax+1 here, but if newmax
* happens to equal SSize_t_MAX, then newmax+1 is
* undefined. This means technically we croak one
* index lower than we should in theory; in practice
* its unlikely the system has SSize_t_MAX/sizeof(SV*)
* bytes to spare! */
- MEM_WRAP_CHECK_1(newmax, SV*, oom_array_extend);
+ MEM_WRAP_CHECK_s(newmax, SV*, "Out of memory during array extend");
}
#ifdef STRESS_REALLOC
{
@@ -176,12 +172,8 @@ Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp,
else {
newmax = key < 3 ? 3 : key;
{
-#ifdef PERL_MALLOC_WRAP /* Duplicated in pp_hot.c */
- static const char oom_array_extend[] =
- "Out of memory during array extend";
-#endif
/* see comment above about newmax+1*/
- MEM_WRAP_CHECK_1(newmax, SV*, oom_array_extend);
+ MEM_WRAP_CHECK_s(newmax, SV*, "Out of memory during array extend");
}
Newx(*allocp, newmax+1, SV*);
ary = *allocp + 1;