Skip to content

Commit

Permalink
Set builtin::indexed proto to "@"
Browse files Browse the repository at this point in the history
  • Loading branch information
JRaspass authored and leonerd committed Aug 17, 2023
1 parent 18d31a1 commit 8be87d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ Perl_boot_core_builtin(pTHX)
proto = "";
else if(builtin->checker == &ck_builtin_func1)
proto = "$";
else if(builtin->checker == &ck_builtin_funcN)
proto = "@";

CV *cv = newXS_flags(builtin->name, builtin->xsub, __FILE__, proto, 0);
XSANY.any_i32 = builtin->ckval;
Expand Down
2 changes: 2 additions & 0 deletions lib/builtin.t
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ package FetchStoreCounter {
my $count = indexed 'i', 'ii', 'iii', 'iv';
is($count, 8, 'indexed in scalar context yields size of list it would return');
}

is(prototype(\&builtin::indexed), '@', 'indexed prototype');
}

# Vanilla trim tests
Expand Down

0 comments on commit 8be87d1

Please sign in to comment.