This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
applied patch to clarify m//g
[perl5.git] / universal.c
index 9a86763..ef4f5b3 100644 (file)
@@ -1,13 +1,12 @@
 #include "EXTERN.h"
 #include "perl.h"
-#include "XSUB.h"
 
 /*
  * Contributed by Graham Barr  <Graham.Barr@tiuk.ti.com>
  * The main guts of traverse_isa was actually copied from gv_fetchmeth
  */
 
-static SV *
+STATIC SV *
 isa_lookup(HV *stash, char *name, int len, int level)
 {
     AV* av;
@@ -22,7 +21,7 @@ isa_lookup(HV *stash, char *name, int len, int level)
        return &sv_yes;
 
     if (level > 100)
-       croak("Recursive inheritance detected");
+       croak("Recursive inheritance detected in package '%s'", HvNAME(stash));
 
     gvp = (GV**)hv_fetch(stash, "::ISA::CACHE::", 14, FALSE);
 
@@ -48,7 +47,8 @@ isa_lookup(HV *stash, char *name, int len, int level)
        }
        if(hv) {
            SV** svp = AvARRAY(av);
-           I32 items = AvFILL(av) + 1;
+           /* NOTE: No support for tied ISA */
+           I32 items = AvFILLp(av) + 1;
            while (items--) {
                SV* sv = *svp++;
                HV* basestash = gv_stashsv(sv, FALSE);
@@ -100,6 +100,11 @@ sv_derived_from(SV *sv, char *name)
  
 }
 
+#ifdef PERL_OBJECT
+#define NO_XSLOCKS
+#endif  /* PERL_OBJECT */
+
+#include "XSUB.h"
 
 static
 XS(XS_UNIVERSAL_isa)
@@ -196,6 +201,12 @@ XS(XS_UNIVERSAL_VERSION)
     XSRETURN(1);
 }
 
+#ifdef PERL_OBJECT
+#undef  boot_core_UNIVERSAL
+#define boot_core_UNIVERSAL CPerlObj::Perl_boot_core_UNIVERSAL
+#define pPerl this
+#endif
+
 void
 boot_core_UNIVERSAL(void)
 {