diff options
author | Alexey Tourbin <at@altlinux.ru> | 2005-06-05 07:08:30 +0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-07 13:53:59 +0000 |
commit | e07360faf0e39eb99a2f8007e291aab60c228731 (patch) | |
tree | 31cfc2fdae351290830caa20bf8621086ff1c2f2 /util.c | |
parent | 926f8064e84e4f3db7d3ef5d47b21d7f46d7c137 (diff) | |
download | perl-e07360faf0e39eb99a2f8007e291aab60c228731.tar.gz |
util.c: S_vdie_common() should be static
Message-ID: <20050604230830.GS5867@solemn.turbinal.org>
p4raw-id: //depot/perl@24729
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 66 |
1 files changed, 32 insertions, 34 deletions
@@ -1076,40 +1076,7 @@ Perl_write_to_stderr(pTHX_ const char* message, int msglen) /* Common code used by vcroak, vdie and vwarner */ -void S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8); - -STATIC char * -S_vdie_croak_common(pTHX_ const char* pat, va_list* args, STRLEN* msglen, - I32* utf8) -{ - dVAR; - char *message; - - if (pat) { - SV *msv = vmess(pat, args); - if (PL_errors && SvCUR(PL_errors)) { - sv_catsv(PL_errors, msv); - message = SvPV(PL_errors, *msglen); - SvCUR_set(PL_errors, 0); - } - else - message = SvPV(msv,*msglen); - *utf8 = SvUTF8(msv); - } - else { - message = Nullch; - } - - DEBUG_S(PerlIO_printf(Perl_debug_log, - "%p: die/croak: message = %s\ndiehook = %p\n", - thr, message, PL_diehook)); - if (PL_diehook) { - S_vdie_common(aTHX_ message, *msglen, *utf8); - } - return message; -} - -void +STATIC void S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8) { HV *stash; @@ -1150,6 +1117,37 @@ S_vdie_common(pTHX_ const char *message, STRLEN msglen, I32 utf8) } } +STATIC char * +S_vdie_croak_common(pTHX_ const char* pat, va_list* args, STRLEN* msglen, + I32* utf8) +{ + dVAR; + char *message; + + if (pat) { + SV *msv = vmess(pat, args); + if (PL_errors && SvCUR(PL_errors)) { + sv_catsv(PL_errors, msv); + message = SvPV(PL_errors, *msglen); + SvCUR_set(PL_errors, 0); + } + else + message = SvPV(msv,*msglen); + *utf8 = SvUTF8(msv); + } + else { + message = Nullch; + } + + DEBUG_S(PerlIO_printf(Perl_debug_log, + "%p: die/croak: message = %s\ndiehook = %p\n", + thr, message, PL_diehook)); + if (PL_diehook) { + S_vdie_common(aTHX_ message, *msglen, *utf8); + } + return message; +} + OP * Perl_vdie(pTHX_ const char* pat, va_list *args) { |