]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
Use XSH_LOCAL_* wherever possible
authorVincent Pit <perl@profvince.com>
Mon, 21 Dec 2015 15:46:47 +0000 (16:46 +0100)
committerVincent Pit <perl@profvince.com>
Mon, 21 Dec 2015 15:54:52 +0000 (16:54 +0100)
But still use New/Safefree for memory blocks handled by perl directly.

Plugin.xs

index 6036d87fff2bf36dfea4aa33fa3a6bbe9fdd4243..d75c0869a22602177a49fbb1568341eba5ddee82 100644 (file)
--- 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);