diff options
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -252,9 +252,13 @@ struct pmop { #ifdef USE_ITHREADS #define PM_GETRE(o) ((REGEXP*)SvIVX(PL_regex_pad[(o)->op_pmoffset])) #define PM_SETRE(o,r) (sv_setiv(PL_regex_pad[(o)->op_pmoffset], (IV)r)) +#define PM_GETRE_SAFE(o) (PL_regex_pad ? PM_GETRE(o) : (REGEXP*)0) +#define PM_SETRE_SAFE(o,r) if (PL_regex_pad) PM_SETRE(o,r) #else #define PM_GETRE(o) ((o)->op_pmregexp) #define PM_SETRE(o,r) ((o)->op_pmregexp = (r)) +#define PM_GETRE_SAFE PM_GETRE +#define PM_SETRE_SAFE PM_SETRE #endif #define PMdf_USED 0x01 /* pm has been used once already */ |