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 /win32 | |
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 'win32')
-rw-r--r-- | win32/win32.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/win32/win32.c b/win32/win32.c index 818a107b04..5d6946ab8b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1662,13 +1662,8 @@ win32_longpath(char *path) static void out_of_memory(void) { - if (PL_curinterp) { - dTHX; - /* 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); - } + if (PL_curinterp) + croak_no_mem(); exit(1); } |