Avoid compiler's warnings
[gitmo/Mouse.git] / mouse.h
diff --git a/mouse.h b/mouse.h
index bfb7836..20415de 100644 (file)
--- a/mouse.h
+++ b/mouse.h
@@ -29,6 +29,7 @@
 #define no_mro_get_linear_isa
 #define mro_get_linear_isa(stash) mouse_mro_get_linear_isa(aTHX_ stash)
 AV* mouse_mro_get_linear_isa(pTHX_ HV* const stash);
+#define mro_method_changed_in(stash) ((void)++PL_sub_generation)
 #endif /* !mro_get_linear_isa */
 
 #ifndef mro_get_pkg_gen
@@ -70,6 +71,15 @@ mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const cha
     ;
 #endif
 
+/* workaround RT #69939 */
+I32
+mouse_call_sv_safe(pTHX_ SV*, I32);
+
+#define call_sv_safe(sv, flags)     mouse_call_sv_safe(aTHX_ sv, flags)
+#define call_method_safe(m, flags)  mouse_call_sv_safe(aTHX_ newSVpvn_flags(m, strlen(m), SVs_TEMP), flags | G_METHOD)
+#define call_method_safes(m, flags) mouse_call_sv_safe(aTHX_ newSVpvs_flags(m, SVs_TEMP),            flags | G_METHOD)
+
+
 #define is_class_loaded(sv) mouse_is_class_loaded(aTHX_ sv)
 bool mouse_is_class_loaded(pTHX_ SV*);
 
@@ -172,7 +182,6 @@ void mouse_instance_weaken_slot(pTHX_ SV* const instance, SV* const slot);
 
 CV* mouse_simple_accessor_generate(pTHX_ const char* const fq_name, const char* const key, I32 const keylen, XSUBADDR_t const accessor_impl, void* const dptr, I32 const dlen);
 
-XS(XS_Mouse_simple_accessor);
 XS(XS_Mouse_simple_reader);
 XS(XS_Mouse_simple_writer);
 XS(XS_Mouse_simple_clearer);