diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-18 05:29:59 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-18 05:29:59 +0000 |
commit | cb55de95c99e46505d72b19ea780c7d46917be32 (patch) | |
tree | e53297810981569bf5562f79f5e952a287cf6e75 /op.h | |
parent | 60425c380d8403607be85706bb016ae8d577acf4 (diff) | |
download | perl-cb55de95c99e46505d72b19ea780c7d46917be32.tar.gz |
Sarathy's clear_pmop patch with Radu Greab's fix,
Hiroto's, Nicholas Clark's, and Vadim Konovalov's tests.
p4raw-id: //depot/perl@9194
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -242,6 +242,11 @@ struct pmop { U16 op_pmflags; U16 op_pmpermflags; U8 op_pmdynflags; +#ifdef USE_ITHREADS + char * op_pmstashpv; +#else + HV * op_pmstash; +#endif }; #define PMdf_USED 0x01 /* pm has been used once already */ @@ -271,6 +276,20 @@ struct pmop { /* mask of bits stored in regexp->reganch */ #define PMf_COMPILETIME (PMf_MULTILINE|PMf_SINGLELINE|PMf_LOCALE|PMf_FOLD|PMf_EXTENDED) +#ifdef USE_ITHREADS +# define PmopSTASHPV(o) ((o)->op_pmstashpv) +# define PmopSTASHPV_set(o,pv) ((o)->op_pmstashpv = ((pv) ? savepv(pv) : Nullch)) +# define PmopSTASH(o) (PmopSTASHPV(o) \ + ? gv_stashpv(PmopSTASHPV(o),GV_ADD) : Nullhv) +# define PmopSTASH_set(o,hv) PmopSTASHPV_set(o, (hv) ? HvNAME(hv) : Nullch) +#else +# define PmopSTASH(o) ((o)->op_pmstash) +# define PmopSTASH_set(o,hv) ((o)->op_pmstash = (hv)) +# define PmopSTASHPV(o) (PmopSTASH(o) ? HvNAME(PmopSTASH(o)) : Nullch) + /* op_pmstash is not refcounted */ +# define PmopSTASHPV_set(o,pv) PmopSTASH_set((o), gv_stashpv(pv,GV_ADD)) +#endif + struct svop { BASEOP SV * op_sv; |