Remove prototypes from MOP.xs. The pure perl implementations don't have prototypes...
Florian Ragwitz [Thu, 25 Dec 2008 14:41:24 +0000 (14:41 +0000)]
The prototype for get_code_info remains as Sub::Identify::get_code_info, which
is used if we couldn't load our xs code, also has a prototype.

MOP.xs

diff --git a/MOP.xs b/MOP.xs
index 4809efb..44ebb0a 100644 (file)
--- a/MOP.xs
+++ b/MOP.xs
@@ -327,12 +327,13 @@ BOOT:
     associated_metaclass = newSVpvs("associated_metaclass");
 
 
-PROTOTYPES: ENABLE
-
+PROTOTYPES: DISABLE
 
+# use prototype here to be compatible with get_code_info from Sub::Identify
 void
 get_code_info(coderef)
     SV *coderef
+    PROTOTYPE: $
     PREINIT:
         char *pkg  = NULL;
         char *name = NULL;
@@ -343,8 +344,6 @@ get_code_info(coderef)
             PUSHs(newSVpv(name, 0));
         }
 
-PROTOTYPES: DISABLE
-
 void
 is_class_loaded(klass=&PL_sv_undef)
     SV *klass
@@ -396,13 +395,10 @@ is_class_loaded(klass=&PL_sv_undef)
 
 MODULE = Class::MOP   PACKAGE = Class::MOP::Package
 
-PROTOTYPES: ENABLE
-
 void
 get_all_package_symbols(self, filter=TYPE_FILTER_NONE)
     SV *self
     type_filter_t filter
-    PROTOTYPE: $;$
     PREINIT:
         HV *stash = NULL;
         HV *symbols = NULL;