Skip debugging code on perls that don't need it
Leon Timmermans [Wed, 16 Mar 2016 09:39:32 +0000 (10:39 +0100)]
Name.xs

diff --git a/Name.xs b/Name.xs
index 71f516c..58342a9 100644 (file)
--- a/Name.xs
+++ b/Name.xs
@@ -74,6 +74,7 @@ subname(name, sub)
                namelen -= end - nameptr;
        }
 
+       #ifdef PERL_VERSION < 10
        /* under debugger, provide information about sub location */
        if (PL_DBsub && CvGV(cv)) {
                HV *hv = GvHV(PL_DBsub);
@@ -107,6 +108,7 @@ subname(name, sub)
                }
                Safefree(full_name);
        }
+       #endif
 
        gv = (GV *) newSV(0);
        gv_init_pvn(gv, stash, nameptr, s - nameptr, GV_ADDMULTI | utf8flag);