Skip to content

op.c toke.c add gv_override_pvs() dont count strings with a finger #23428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions handy.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ Perl_xxx(aTHX_ ...) form for any API calls where it's used.
Perl_gv_fetchpvn_flags(aTHX_ STR_WITH_LEN(name), flags, sv_type)
#define gv_fetchpvn gv_fetchpvn_flags

/* gv_override() is not exported from libperl */
#ifdef PERL_CORE
# define gv_override_pvs(name) Perl_gv_override(aTHX_ STR_WITH_LEN(name))
#endif

/*
=for apidoc_defn mx|void|lex_stuff_pvs|"pv"|U32 flags
Expand Down
8 changes: 4 additions & 4 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -8506,7 +8506,7 @@ Perl_dofile(pTHX_ OP *term, I32 force_builtin)

PERL_ARGS_ASSERT_DOFILE;

if (!force_builtin && (gv = gv_override("do", 2))) {
if (!force_builtin && (gv = gv_override_pvs("do"))) {
doop = S_new_entersubop(aTHX_ gv, term);
}
else {
Expand Down Expand Up @@ -12482,7 +12482,7 @@ Perl_ck_backtick(pTHX_ OP *o)
o = ck_fun(o);
/* qx and `` have a null pushmark; CORE::readpipe has only one kid. */
if (o->op_flags & OPf_KIDS && (sibl = OpSIBLING(cUNOPo->op_first))
&& (gv = gv_override("readpipe",8)))
&& (gv = gv_override_pvs("readpipe")))
{
/* detach rest of siblings from o and its first child */
op_sibling_splice(o, cUNOPo->op_first, -1, NULL);
Expand Down Expand Up @@ -13441,7 +13441,7 @@ Perl_ck_glob(pTHX_ OP *o)
if ((o->op_flags & OPf_KIDS) && !OpHAS_SIBLING(cLISTOPo->op_first))
op_append_elem(OP_GLOB, o, newDEFSVOP()); /* glob() => glob($_) */

if (!(o->op_flags & OPf_SPECIAL) && (gv = gv_override("glob", 4)))
if (!(o->op_flags & OPf_SPECIAL) && (gv = gv_override_pvs("glob")))
{
/* convert
* glob
Expand Down Expand Up @@ -14118,7 +14118,7 @@ Perl_ck_require(pTHX_ OP *o)

if (!(o->op_flags & OPf_SPECIAL) /* Wasn't written as CORE::require */
/* handle override, if any */
&& (gv = gv_override("require", 7))) {
&& (gv = gv_override_pvs("require"))) {
OP *kid, *newop;
if (o->op_flags & OPf_KIDS) {
kid = cUNOPo->op_first;
Expand Down
2 changes: 1 addition & 1 deletion toke.c
Original file line number Diff line number Diff line change
Expand Up @@ -11462,7 +11462,7 @@ S_scan_inputsymbol(pTHX_ char *start)
Copy("ARGV",d,5,char);

/* Check whether readline() is overridden */
if ((gv_readline = gv_override("readline",8)))
if ((gv_readline = gv_override_pvs("readline")))
readline_overridden = TRUE;

/* if <$fh>, create the ops to turn the variable into a
Expand Down
Loading