This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove unused parms in S_isa_lookup
[perl5.git] / universal.c
index 354ee61..396dd3d 100644 (file)
  */
 
 STATIC bool
-S_isa_lookup(pTHX_ HV *stash, const char *name, const HV* const name_stash,
-             int len, int level)
+S_isa_lookup(pTHX_ HV *stash, const char * const name, const HV* const name_stash)
 {
     dVAR;
     AV* stash_linear_isa;
     SV** svp;
     const char *hvname;
     I32 items;
-    PERL_UNUSED_ARG(len);
-    PERL_UNUSED_ARG(level);
 
     /* A stash/class can go by many names (ie. User == main::User), so 
        we compare the stash itself just in case */
@@ -61,8 +58,8 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, const HV* const name_stash,
     items = AvFILLp(stash_linear_isa);
     while (items--) {
        SV* const basename_sv = *svp++;
-        HV* basestash = gv_stashsv(basename_sv, 0);
-       if (!basestash || (HvMROMETA(basestash)->fake && !HvFILL(basestash))) {
+        HV* const basestash = gv_stashsv(basename_sv, 0);
+       if (!basestash) {
            if (ckWARN(WARN_SYNTAX))
                Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
                            "Can't locate package %"SVf" for the parents of %s",
@@ -110,7 +107,7 @@ Perl_sv_derived_from(pTHX_ SV *sv, const char *name)
 
     if (stash) {
        HV * const name_stash = gv_stashpv(name, 0);
-       return isa_lookup(stash, name, name_stash, strlen(name), 0);
+       return isa_lookup(stash, name, name_stash);
     }
     else
        return FALSE;
@@ -284,8 +281,6 @@ Perl_boot_core_UNIVERSAL(pTHX)
     newXSproto("Internals::hash_seed",XS_Internals_hash_seed, file, "");
     newXSproto("Internals::rehash_seed",XS_Internals_rehash_seed, file, "");
     newXSproto("Internals::HvREHASH", XS_Internals_HvREHASH, file, "\\%");
-    newXSproto("Internals::inc_sub_generation",XS_Internals_inc_sub_generation,
-              file, "");
     newXSproto("re::is_regexp", XS_re_is_regexp, file, "$");
     newXSproto("re::regname", XS_re_regname, file, ";$$");
     newXSproto("re::regnames", XS_re_regnames, file, ";$");
@@ -1057,18 +1052,6 @@ XS(XS_Internals_HvREHASH)        /* Subject to change  */
     Perl_croak(aTHX_ "Internals::HvREHASH $hashref");
 }
 
-XS(XS_Internals_inc_sub_generation)
-{
-    dVAR;
-    /* Using dXSARGS would also have dITEM and dSP,
-     * which define 2 unused local variables.  */
-    dAXMARK;
-    PERL_UNUSED_ARG(cv);
-    PERL_UNUSED_VAR(mark);
-    ++PL_sub_generation;
-    XSRETURN_EMPTY;
-}
-
 XS(XS_re_is_regexp)
 {
     dVAR; 
@@ -1115,7 +1098,7 @@ XS(XS_re_regname)
        }
         {
             if (SvPOK(sv) && re && re->paren_names) {
-                bufs = CALLREG_NAMEDBUF(re,sv,all && SvTRUE(all));
+                bufs = CALLREG_NAMEDBUF_FETCH(re,sv,all && SvTRUE(all));
                 if (bufs) {
                     if (all && SvTRUE(all))
                         XPUSHs(newRV(bufs));