diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-08-11 22:19:50 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-08-12 06:28:10 -0700 |
commit | 465bc0f5bf04702adf1825f8db8511ecc5c3adfc (patch) | |
tree | 089d41911358bd6b5f17d1169cee5794637a31e1 /op.c | |
parent | 93e6f00ed5ef68c787902ea1f88084f619b59561 (diff) | |
download | perl-465bc0f5bf04702adf1825f8db8511ecc5c3adfc.tar.gz |
Change (l)stat’s prototype from * to ;*
Since the argument is optional, we need a semicolon.
This commit accomplishes that by setting the OA_OPTIONAL flag for the
appropriate entries in PL_opargs. This should not affect anything
else, as ck_ftst (the check routine for [l]stat) doesn’t even look at
PL_opargs.
It also has to tweak the prototype-generation logic slightly, because
PL_opargs also has OA_DEFGV set.
I think this is insignificant enough not to warrant a delta entry.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -10314,7 +10314,9 @@ Perl_core_prototype(pTHX_ SV *sv, const char *name, const STRLEN len, defgv = PL_opargs[i] & OA_DEFGV; oa = PL_opargs[i] >> OASHIFT; while (oa) { - if (oa & OA_OPTIONAL && !seen_question && (!defgv || n)) { + if (oa & OA_OPTIONAL && !seen_question && ( + !defgv || n || (oa & (OA_OPTIONAL - 1)) == OA_FILEREF + )) { seen_question = 1; str[n++] = ';'; } |