But still use New/Safefree for memory blocks handled by perl directly.
/* Our blessed object */
obj = newSV(0);
/* 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);
sv_setref_pv(obj, XSH_PACKAGE, (void *) re);
newREGEXP(RX);
+ XSH_LOCAL_FREE(self, 1, struct replug);
SvREFCNT_dec(rx->pprivate);
SvREFCNT_dec(rx->pprivate);