From: Yuval Kogman Date: Fri, 22 Aug 2008 08:30:29 +0000 (+0000) Subject: SvTRUE(POPs) segfaults, need to use a safe expr X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fb4ccd5a270d553ea73397300c9d50e691c8543e;p=gitmo%2FMoose.git SvTRUE(POPs) segfaults, need to use a safe expr --- diff --git a/Moose.xs b/Moose.xs index 6da686d..2807256 100644 --- a/Moose.xs +++ b/Moose.xs @@ -492,6 +492,7 @@ STATIC bool check_sv_type (TC type, SV *sv) { /* invoke a CV on an SV and return SvTRUE of the result */ STATIC bool check_sv_cv (pTHX_ SV *cv, SV *sv) { + SV *ret_sv; bool ret; dSP; @@ -504,7 +505,8 @@ STATIC bool check_sv_cv (pTHX_ SV *cv, SV *sv) { call_sv(cv, G_SCALAR); SPAGAIN; - ret = SvTRUE(POPs); + ret_sv = POPs; + ret = SvTRUE(ret_sv); PUTBACK; FREETMPS;