From: Stephen McCamant Date: Wed, 8 Jul 1998 23:16:49 +0000 (-0500) Subject: UNOP opclass test in B.xs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=45f6cd40adbe98ca464cda969ccb3807be35e893;p=p5sagit%2Fp5-mst-13.2.git UNOP opclass test in B.xs Message-Id: <13732.16626.904108.608743@alias-2.pr.mcs.net> p4raw-id: //depot/perl@1395 --- diff --git a/ext/B/B.xs b/ext/B/B.xs index b111e67..f9a0645 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: /*