Make TAP output UTF8
[p5sagit/Sub-Name.git] / Name.xs
diff --git a/Name.xs b/Name.xs
index d7fd127..312485f 100644 (file)
--- a/Name.xs
+++ b/Name.xs
@@ -7,6 +7,7 @@
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
+#include "ppport.h"
 
 static MGVTBL subname_vtbl;
 
@@ -71,6 +72,7 @@ subname(name, sub)
        /* under debugger, provide information about sub location */
        if (PL_DBsub && CvGV(cv)) {
                HV *hv = GvHV(PL_DBsub);
+               SV** old_data;
 
                char* new_pkg = HvNAME(stash);
 
@@ -87,7 +89,7 @@ subname(name, sub)
                strcat(full_name, "::");
                strcat(full_name, old_name);
 
-               SV** old_data = hv_fetch(hv, full_name, strlen(full_name), 0);
+               old_data = hv_fetch(hv, full_name, strlen(full_name), 0);
 
                if (old_data) {
                        strcpy(full_name, new_pkg);