X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=xs-src%2FMouseUtil.xs;h=f99c6f6a1e9a0a11b3bbda5cbb1b3b783463e361;hp=c1d4d91cba7df1fdf66c17d63b2c45be0283d14a;hb=0aad026606f2d1d5d27cfb8824dd182f790fa9e2;hpb=d4712779eb600de46ed09b09afd193d3def11786 diff --git a/xs-src/MouseUtil.xs b/xs-src/MouseUtil.xs index c1d4d91..f99c6f6 100644 --- a/xs-src/MouseUtil.xs +++ b/xs-src/MouseUtil.xs @@ -156,9 +156,8 @@ mouse_is_class_loaded(pTHX_ SV * const klass){ } -SV * -mouse_call0 (pTHX_ SV *const self, SV *const method) -{ +SV* +mouse_call0 (pTHX_ SV* const self, SV* const method) { dSP; SV *ret; @@ -175,9 +174,8 @@ mouse_call0 (pTHX_ SV *const self, SV *const method) return ret; } -SV * -mouse_call1 (pTHX_ SV *const self, SV *const method, SV* const arg1) -{ +SV* +mouse_call1 (pTHX_ SV* const self, SV* const method, SV* const arg1) { dSP; SV *ret; @@ -196,6 +194,12 @@ mouse_call1 (pTHX_ SV *const self, SV *const method, SV* const arg1) return ret; } +int +mouse_predicate_call(pTHX_ SV* const self, SV* const method) { + SV* const value = mcall0(self, method); + return SvTRUE(value); +} + SV* mouse_get_metaclass(pTHX_ SV* metaclass_name){ CV* const get_metaclass = get_cvs("Mouse::Util::get_metaclass_by_name", TRUE);