Make mouse_accessor_get_self() "static inline"
[gitmo/Mouse.git] / mouse.h
diff --git a/mouse.h b/mouse.h
index 0be0825..9d86675 100644 (file)
--- a/mouse.h
+++ b/mouse.h
@@ -8,7 +8,8 @@
 
 #include "ppport.h"
 
-/* for portability */
+/* Portability stuff */
+
 #ifndef newSVpvs_share
 #define newSVpvs_share(s) Perl_newSVpvn_share(aTHX_ s, sizeof(s)-1, 0U)
 #endif
@@ -38,6 +39,14 @@ AV* mouse_mro_get_linear_isa(pTHX_ HV* const stash);
 #endif /* !no_mro_get_linear_isa */
 #endif /* mro_get_package_gen */
 
+#if !defined(__GNUC__)
+#  if (!defined(__cplusplus__) || !defined(__STDC_VERSION__) ||  (__STDC_VERSION__ < 199901L)) && !defined(inline)
+#    define inline /* nothing */
+#  endif
+#endif
+
+/* Mouse stuff */
+
 #define newAV_mortal() (AV*)sv_2mortal((SV*)newAV())
 #define newHV_mortal() (HV*)sv_2mortal((SV*)newHV())
 
@@ -103,9 +112,6 @@ SV** mouse_av_at_safe(pTHX_ AV* const mi, I32 const ix);
 #define MOUSE_av_at(av, ix)  AvARRAY(av)[ix]
 #endif
 
-#define dMOUSE_self  SV* const self = mouse_accessor_get_self(aTHX_ ax, items, cv)
-SV* mouse_accessor_get_self(pTHX_ I32 const ax, I32 const items, CV* const cv);
-
 #define MOUSE_mg_obj(mg)     ((mg)->mg_obj)
 #define MOUSE_mg_ptr(mg)     ((mg)->mg_ptr)
 #define MOUSE_mg_flags(mg)   ((mg)->mg_private)