From 7391a1634af9fc4c03048f12594b25fd776ccf98 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 12 Aug 2011 12:29:07 -0700 Subject: [PATCH] =?utf8?q?Remove=20select=E2=80=99s=20prototype?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit select has a prototype of (;*), which is incorrect, as it implied that it has high precedence. It also fails to account for the four-argu- ment form. While removing all incorrect prototypes is counterproduc- tive, I think this one is wrong enough it deserves to go. (And the precedence problem is a good argument against it, as there is cur- rently no other way to set precedence.) --- dist/B-Deparse/Deparse.pm | 4 ++-- op.c | 2 +- t/op/cproto.t | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm index 848b2fa..cb60bae 100644 --- a/dist/B-Deparse/Deparse.pm +++ b/dist/B-Deparse/Deparse.pm @@ -26,7 +26,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring ($] < 5.009 ? 'PMf_SKIPWHITE' : qw(RXf_SKIPWHITE)), ($] < 5.011 ? 'CVf_LOCKED' : 'OPpREVERSE_INPLACE'), ($] < 5.013 ? () : 'PMf_NONDESTRUCT'); -$VERSION = "1.06"; +$VERSION = "1.07"; use strict; use vars qw/$AUTOLOAD/; use warnings (); @@ -1553,7 +1553,7 @@ sub keyword { : "CORE::$name"; } if ( - $name !~ /^(?:chom?p|exec|system)\z/ + $name !~ /^(?:chom?p|exec|s(?:elect|ystem))\z/ && !defined eval{prototype "CORE::$name"} ) { return $name } if ( diff --git a/op.c b/op.c index 0ab2d1e..1f6743d 100644 --- a/op.c +++ b/op.c @@ -10283,7 +10283,7 @@ Perl_core_prototype(pTHX_ SV *sv, const char *name, const STRLEN len, case KEY_cmp : case KEY_exec: case KEY_eq : case KEY_ge : case KEY_gt : case KEY_le : case KEY_lt : case KEY_ne : case KEY_or : - case KEY_system: case KEY_x : case KEY_xor : + case KEY_select: case KEY_system: case KEY_x : case KEY_xor: return NULL; case KEY_keys: case KEY_values: case KEY_each: retsetpvs("+"); diff --git a/t/op/cproto.t b/t/op/cproto.t index 9711f82..1476ae6 100644 --- a/t/op/cproto.t +++ b/t/op/cproto.t @@ -197,7 +197,7 @@ say undef scalar undef seek (*$$) seekdir (*$) -select (;*) +select undef semctl ($$$$) semget ($$$) semop ($$) -- 1.8.3.1