Blob Blame History Raw
--- ./lib/core/src/perl/CPlusPlus.xxs.orig	2014-10-13 06:14:22.000000000 -0600
+++ ./lib/core/src/perl/CPlusPlus.xxs	2015-06-23 21:57:23.088657455 -0600
@@ -348,7 +348,7 @@ MAGIC* allocate_magic(pTHX_ SV* sv, char
       Newxz(mg->mg_ptr, vtab->obj_size, char);
    }
    mg->mg_virtual = (MGVTBL*)&vtab->std;
-   Perl_mg_magical(aTHX_ sv);
+   Perl_mg_magical(sv);
    return mg;
 }
 
--- ./lib/core/src/perl/namespaces.xs.orig	2014-10-13 06:14:22.000000000 -0600
+++ ./lib/core/src/perl/namespaces.xs	2015-06-23 21:16:44.995221409 -0600
@@ -207,7 +207,13 @@ int reset_ptrs_via_magic(pTHX_ SV* sv, M
    return 0;
 }
 
-#if PerlVersion >= 5200
+#if PerlVersion >= 5220
+# define SetPadnamesOfCurrentSub(savevar) \
+  PADNAMELIST* savevar=PL_comppad_name; \
+  PL_comppad_name=PadlistNAMES(CvPADLIST(pm_perl_get_cur_cv(aTHX)))
+# define RestorePadnames(savevar) \
+  PL_comppad_name=savevar
+#elif PerlVersion >= 5200
 /* op_clear reaches into PL_comppad_name which points to something different during the execution phase */
 # define SetPadnamesOfCurrentSub(savevar) \
   AV* savevar=PL_comppad_name; \
@@ -747,7 +753,7 @@ void store_package_gv(pTHX_ GV *var_gv,
 }
 
 static inline
-GV* test_imported_gv(GV *gv, I32 type, int ignore_methods)
+GV* test_imported_gv(pTHX_ GV *gv, I32 type, int ignore_methods)
 {
    switch (type) {
    case SVt_PV:
@@ -776,7 +782,7 @@ GV* try_stored_package_gv(pTHX_ GV *gv,
 {
    MAGIC *mg=mg_find((SV*)gv,PERL_MAGIC_ext);
    if (mg && (gv=(GV*)mg->mg_obj)) {
-      gv=test_imported_gv(gv, type, ignore_methods);
+      gv=test_imported_gv(aTHX_ gv, type, ignore_methods);
       return gv==(GV*)-1UL ? Nullgv : gv;
    }
    return Nullgv;
@@ -789,7 +795,7 @@ GV* lookup_name_in_stash(pTHX_ HV *stash
    if (gvp) {
       GV *gv=*gvp;
       if (SvTYPE(gv)==SVt_PVGV) {
-         GV *imp_gv=test_imported_gv(gv, type, ignore_methods);
+         GV *imp_gv=test_imported_gv(aTHX_ gv, type, ignore_methods);
          if (imp_gv) return imp_gv==(GV*)-1UL ? Nullgv : imp_gv;
          return try_stored_package_gv(aTHX_ gv, type, ignore_methods);
       }
@@ -1110,7 +1116,7 @@ void lookup(pTHX_ GV* var_gv, I32 type,
             if (other_stash==stash) {
                MAGIC *mg=mg_find((SV*)var_gv,PERL_MAGIC_ext);
                if (mg && (imp_gv=(GV*)mg->mg_obj) &&
-                   (imp_gv=test_imported_gv(imp_gv, type, FALSE))) {
+                   (imp_gv=test_imported_gv(aTHX_ imp_gv, type, FALSE))) {
                   repair_pp_gv(aTHX_ var_gv, imp_gv);
                   return;
                }