From: Vincent Pit Date: Mon, 21 Dec 2015 15:46:47 +0000 (+0100) Subject: Use XSH_LOCAL_* wherever possible X-Git-Tag: v0.12~1 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=96443e542ea367fc512abd5f8bd0d44174992e7d;p=perl%2Fmodules%2Fre-engine-Plugin.git Use XSH_LOCAL_* wherever possible But still use New/Safefree for memory blocks handled by perl directly. --- diff --git a/Plugin.xs b/Plugin.xs index 6036d87..d75c086 100644 --- a/Plugin.xs +++ b/Plugin.xs @@ -209,7 +209,7 @@ Plugin_comp(pTHX_ const SV * const pattern, const U32 flags) /* Our blessed object */ obj = newSV(0); - Newx(re, 1, struct replug); + XSH_LOCAL_ALLOC(re, 1, struct replug); sv_setref_pv(obj, XSH_PACKAGE, (void *) re); newREGEXP(RX); @@ -405,7 +405,7 @@ Plugin_free(pTHX_ REGEXP * const RX) self->rx = NULL; - Safefree(self); + XSH_LOCAL_FREE(self, 1, struct replug); SvREFCNT_dec(rx->pprivate);