diff options
author | Stephen McCamant <smcc@mit.edu> | 1998-07-08 18:16:49 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-09 05:39:48 +0000 |
commit | 45f6cd40adbe98ca464cda969ccb3807be35e893 (patch) | |
tree | 7e0e3f264dc4c8c846f4525a3056143ead3effcb /ext/B | |
parent | 15e52e56ffc1b4b0632038d47561373c5ca610c4 (diff) | |
download | perl-45f6cd40adbe98ca464cda969ccb3807be35e893.tar.gz |
UNOP opclass test in B.xs
Message-Id: <13732.16626.904108.608743@alias-2.pr.mcs.net>
p4raw-id: //depot/perl@1395
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/B.xs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs index b111e67583..f9a0645bb8 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -135,12 +135,12 @@ cc_opclass(OP *o) case OA_BASEOP_OR_UNOP: /* * UNI(OP_foo) in toke.c returns token UNI or FUNC1 depending on - * whether bare parens were seen. perly.y uses OPf_SPECIAL to - * signal whether an OP or an UNOP was chosen. - * Frederic.Chauveau@pasteur.fr says we need to check for OPf_KIDS too. + * whether parens were seen. perly.y uses OPf_SPECIAL to + * signal whether a BASEOP had empty parens or none. + * Some other UNOPs are created later, though, so the best + * test is OPf_KIDS, which is set in newUNOP. */ - return ((o->op_flags & OPf_SPECIAL) ? OPc_BASEOP : - (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP); + return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP; case OA_FILESTATOP: /* |