From: gfx Date: Tue, 17 Nov 2009 01:41:56 +0000 (+0900) Subject: Make mouse_accessor_get_self() "static inline" X-Git-Tag: 0.40_07~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc7cd81f082a9aaa3dd17ca07dbb91da28bd0b69;p=gitmo%2FMouse.git Make mouse_accessor_get_self() "static inline" --- diff --git a/mouse.h b/mouse.h index e607cf0..9d86675 100644 --- a/mouse.h +++ b/mouse.h @@ -112,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) diff --git a/xs-src/MouseAccessor.xs b/xs-src/MouseAccessor.xs index ef5009a..d724f93 100644 --- a/xs-src/MouseAccessor.xs +++ b/xs-src/MouseAccessor.xs @@ -11,8 +11,9 @@ static MGVTBL mouse_accessor_vtbl; /* MAGIC identity */ +#define dMOUSE_self SV* const self = mouse_accessor_get_self(aTHX_ ax, items, cv) -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)));