Skip to content

Commit 7a39510

Browse files
committed
threads: make generic "Out of memory!" message more specific
1 parent 8fbf04a commit 7a39510

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

dist/threads/lib/threads.pm

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use 5.008;
55
use strict;
66
use warnings;
77

8-
our $VERSION = '2.39'; # remember to update version in POD!
8+
our $VERSION = '2.40'; # remember to update version in POD!
99
my $XS_VERSION = $VERSION;
10-
$VERSION = eval $VERSION;
10+
#$VERSION = eval $VERSION;
1111

1212
# Verify this Perl supports threads
1313
require Config;
@@ -134,7 +134,7 @@ threads - Perl interpreter-based threads
134134
135135
=head1 VERSION
136136
137-
This document describes threads version 2.39
137+
This document describes threads version 2.40
138138
139139
=head1 WARNING
140140

dist/threads/threads.xs

+2-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ S_ithread_create(
796796
int fd = PerlIO_fileno(Perl_error_log);
797797
if (fd >= 0) {
798798
/* If there's no error_log, we cannot scream about it missing. */
799-
PERL_UNUSED_RESULT(PerlLIO_write(fd, PL_no_mem, strlen(PL_no_mem)));
799+
static const char oomp[] = "Out of memory in perl:threads:ithread_create\n";
800+
PERL_UNUSED_RESULT(PerlLIO_write(fd, oomp, sizeof oomp - 1));
800801
}
801802
}
802803
my_exit(1);

0 commit comments

Comments
 (0)