diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2012-11-12 06:19:10 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-12 08:32:50 -0800 |
commit | 4cbe3a7d4e9196aab2ca064651827e69cfa50f74 (patch) | |
tree | 11adea255a75691aac2e61ba2162d24ca40f9a59 /perlio.c | |
parent | 0e578cb525681b03d8893587039eba95f1e2e0ab (diff) | |
download | perl-4cbe3a7d4e9196aab2ca064651827e69cfa50f74.tar.gz |
clean up the users of PL_no_mem
This commit eliminates a couple strlen()s of a literal. "Out of memory!\n"
and PL_no_mem did not string pool on Visual C, so PL_no_mem was given a
length. This commit removes S_write_no_mem and replaces it with nonstatic.
Perl_croak_no_mem was made nocontext to save instructions in it's callers.
NORETURN_FUNCTION_END caused a syntax error on Visual C C++ mode and
therefore was removed.
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2337,10 +2337,7 @@ S_more_refcounted_fds(pTHX_ const int new_fd) { #ifdef USE_ITHREADS MUTEX_UNLOCK(&PL_perlio_mutex); #endif - /* Can't use PerlIO to write as it allocates memory */ - PerlLIO_write(PerlIO_fileno(Perl_error_log), - PL_no_mem, strlen(PL_no_mem)); - my_exit(1); + croak_no_mem(); } PL_perlio_fd_refcnt_size = new_max; |