diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2019-05-21 17:34:49 +0100 |
---|---|---|
committer | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2019-05-27 17:30:34 +0100 |
commit | 1d31efef7dd4388fd606972e67bda3318e8838fe (patch) | |
tree | d9e6fd80636771a7c37b562003cf5bf0c16cddf0 /op.h | |
parent | d4e32ec55bb4cf73441c3c8749fd6545c9af4259 (diff) | |
download | perl-1d31efef7dd4388fd606972e67bda3318e8838fe.tar.gz |
Don't use PL_check[op_type] to check for filetets ops to stack
This breaks hooking the filetest ops' check function by modules like
bareword::filehandles. Instead use the OP_IS_FILETEST() macro to decide
check for filetest ops. Also add an OP_IS_STAT() macro for when we want
to check for (l)stat as well as the filetest ops.
c.f. https://rt.cpan.org/Ticket/Display.html?id=127073
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1021,6 +1021,8 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>. #define OP_TYPE_ISNT_AND_WASNT(o, type) \ ( (o) && OP_TYPE_ISNT_AND_WASNT_NN(o, type) ) +/* should match anything that uses ck_ftst in regen/opcodes */ +#define OP_IS_STAT(op) (OP_IS_FILETEST(op) || (op) == OP_LSTAT || (op) == OP_STAT) # define OpHAS_SIBLING(o) (cBOOL((o)->op_moresib)) # define OpSIBLING(o) (0 + (o)->op_moresib ? (o)->op_sibparent : NULL) |