From: gfx Date: Sat, 28 Aug 2010 07:43:12 +0000 (+0900) Subject: Use STATIC_INLINE, which will be introduced at 5.14.0 X-Git-Tag: 0.65~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc65056916e1380327d40cce9e4fe06e4a97eae3;p=gitmo%2FMouse.git Use STATIC_INLINE, which will be introduced at 5.14.0 --- diff --git a/mouse.h b/mouse.h index 2c57da0..74c46f0 100644 --- a/mouse.h +++ b/mouse.h @@ -44,11 +44,13 @@ 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 +#ifndef STATIC_INLINE /* from 5.13.4 */ +# if defined(__GNUC__) || defined(__cplusplus__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) +# define STATIC_INLINE static inline +# else +# define STATIC_INLINE static +# endif +#endif /* STATIC_INLINE */ /* Mouse stuff */ diff --git a/xs-src/MouseAccessor.xs b/xs-src/MouseAccessor.xs index 1dad5e6..d3d046a 100644 --- a/xs-src/MouseAccessor.xs +++ b/xs-src/MouseAccessor.xs @@ -14,7 +14,7 @@ static MGVTBL mouse_accessor_vtbl; /* MAGIC identity */ #define dMOUSE_self SV* const self = mouse_accessor_get_self(aTHX_ ax, items, cv) -static inline SV* +STATIC_INLINE SV* mouse_accessor_get_self(pTHX_ I32 const ax, I32 const items, CV* const cv) { if(items < 1){ croak("Too few arguments for %s", GvNAME(CvGV(cv))); diff --git a/xs-src/MouseTypeConstraints.xs b/xs-src/MouseTypeConstraints.xs index 5ad3389..096ce4a 100644 --- a/xs-src/MouseTypeConstraints.xs +++ b/xs-src/MouseTypeConstraints.xs @@ -392,7 +392,7 @@ mouse_lookup_isa(pTHX_ HV* const instance_stash, const char* const klass_pv){ #define find_method_pvn(a, b, c) mouse_stash_find_method(aTHX_ a, b, c) #define find_method_pvs(a, b) mouse_stash_find_method(aTHX_ a, STR_WITH_LEN(b)) -static inline GV* +STATIC_INLINE GV* mouse_stash_find_method(pTHX_ HV* const stash, const char* const name, I32 const namelen){ GV** const gvp = (GV**)hv_fetch(stash, name, namelen, FALSE); if(gvp && isGV(*gvp) && GvCV(*gvp)){ /* shortcut */