This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Resolve XS AUTOLOAD-prototype conflict
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 755b8b4..47ad804 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3739,7 +3739,7 @@ S_intuit_method(pTHX_ char *start, GV *gv, CV *cv)
            return 0;
        if (cv) {
            if (SvPOK(cv)) {
-               const char *proto = SvPVX_const(cv);
+               const char *proto = CvPROTO(cv);
                if (proto) {
                    if (*proto == ';')
                        proto++;
@@ -6775,8 +6775,8 @@ Perl_yylex(pTHX)
 #endif
                        SvPOK(cv))
                    {
-                       STRLEN protolen;
-                       const char *proto = SvPV_const(MUTABLE_SV(cv), protolen);
+                       STRLEN protolen = CvPROTOLEN(cv);
+                       const char *proto = CvPROTO(cv);
                        if (!protolen)
                            TERM(FUNC0SUB);
                        while (*proto == ';')