Declaring extern functions within a scope doesn't seem to be valid in c++.
Florian Ragwitz [Sun, 15 Mar 2009 17:57:40 +0000 (18:57 +0100)]
mop.h
xs/MOP.xs

diff --git a/mop.h b/mop.h
index 4aa5788..1264f07 100644 (file)
--- a/mop.h
+++ b/mop.h
 #define NEED_sv_2pv_nolen
 #include "ppport.h"
 
-#define MOP_CALL_BOOT(name) \
-    { \
-        EXTERN_C XS(name); \
-        mop_call_xs(aTHX_ name, cv, mark); \
-    }
+#define MOP_CALL_BOOT(name)  mop_call_xs(aTHX_ name, cv, mark);
 
 void mop_call_xs (pTHX_ void (*subaddr) (pTHX_ CV *), CV *cv, SV **mark);
 
index 60c006c..f92a1cc 100644 (file)
--- a/xs/MOP.xs
+++ b/xs/MOP.xs
@@ -12,6 +12,11 @@ find_method (const char *key, STRLEN keylen, SV *val, void *ud)
     return FALSE;
 }
 
+EXTERN_C XS(boot_Class__MOP__Package);
+EXTERN_C XS(boot_Class__MOP__Class);
+EXTERN_C XS(boot_Class__MOP__Attribute);
+EXTERN_C XS(boot_Class__MOP__Method);
+
 MODULE = Class::MOP   PACKAGE = Class::MOP
 
 PROTOTYPES: DISABLE