summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-20 15:22:22 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-20 15:22:22 +0000
commit5458a98a294861b5056e599fe9e1cbe7c1f7b678 (patch)
treee932c1ea2c55b975f3988796370bff692aab5897 /pp.c
parent564914cd4f6b4bf8bd455752588c80fe2e116eb0 (diff)
downloadperl-5458a98a294861b5056e599fe9e1cbe7c1f7b678.tar.gz
prototype() wasn't working to get the prototype of optional core
keywords (like say, err, given.) Fix this by adding a parameter to Perl_keyword to always get the keyword number, even if the feature isn't in effect. p4raw-id: //depot/perl@28874
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 0c9ef631f8..6809b3176e 100644
--- a/pp.c
+++ b/pp.c
@@ -389,7 +389,7 @@ PP(pp_prototype)
if (SvPOK(TOPs) && SvCUR(TOPs) >= 7) {
const char * const s = SvPVX_const(TOPs);
if (strnEQ(s, "CORE::", 6)) {
- const int code = keyword(s + 6, SvCUR(TOPs) - 6);
+ const int code = keyword(s + 6, SvCUR(TOPs) - 6, 1);
if (code < 0) { /* Overridable. */
#define MAX_ARGS_OP ((sizeof(I32) - 1) * 2)
int i = 0, n = 0, seen_question = 0;
@@ -397,7 +397,7 @@ PP(pp_prototype)
char str[ MAX_ARGS_OP * 2 + 2 ]; /* One ';', one '\0' */
if (code == -KEY_chop || code == -KEY_chomp
- || code == -KEY_exec || code == -KEY_system)
+ || code == -KEY_exec || code == -KEY_system || code == -KEY_err)
goto set;
while (i < MAXO) { /* The slow way. */
if (strEQ(s + 6, PL_op_name[i])