Change 24729 by [EMAIL PROTECTED] on 2005/06/07 13:53:59

        Subject: [PATCH] util.c: S_vdie_common() should be static
        From: Alexey Tourbin <[EMAIL PROTECTED]>
        Date: Sun, 5 Jun 2005 03:08:30 +0400
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/util.c#460 edit

Differences ...

==== //depot/perl/util.c#460 (text) ====
Index: perl/util.c
--- perl/util.c#459~24725~      Tue Jun  7 05:08:58 2005
+++ perl/util.c Tue Jun  7 06:53:59 2005
@@ -1076,40 +1076,7 @@
 
 /* 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;
@@ -1148,6 +1115,37 @@
        POPSTACK;
        LEAVE;
     }
+}
+
+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 *
End of Patch.

Reply via email to