diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2023-01-13 19:57:22 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2023-01-14 01:10:15 +0000 |
commit | 54b3381a00e201e4524d82138e335c8c8c4c37f5 (patch) | |
tree | 829c72920287d6fc213753744027d8a7154fd70c /perl.c | |
parent | 3bbe14f5ab0067b7ce4357aaa1fc3ecfc48afac6 (diff) | |
download | perl-54b3381a00e201e4524d82138e335c8c8c4c37f5.tar.gz |
get_{av,hv} should ignore SVf_UTF8 when testing if flags == 0
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2845,7 +2845,8 @@ Returns the AV of the specified Perl global or package array with the given name (so it won't work on lexical variables). C<flags> are passed to C<gv_fetchpv>. If C<GV_ADD> is set and the Perl variable does not exist then it will be created. If C<flags> is zero -and the variable does not exist then NULL is returned. +(ignoring C<SVf_UTF8>) and the variable does not exist then C<NULL> is +returned. Perl equivalent: C<@{"$name"}>. @@ -2859,7 +2860,7 @@ Perl_get_av(pTHX_ const char *name, I32 flags) PERL_ARGS_ASSERT_GET_AV; - if (flags) + if (flags & ~SVf_UTF8) return GvAVn(gv); if (gv) return GvAV(gv); @@ -2874,7 +2875,8 @@ Perl_get_av(pTHX_ const char *name, I32 flags) Returns the HV of the specified Perl hash. C<flags> are passed to C<gv_fetchpv>. If C<GV_ADD> is set and the Perl variable does not exist then it will be created. If C<flags> is zero -and the variable does not exist then C<NULL> is returned. +(ignoring C<SVf_UTF8>) and the variable does not exist then C<NULL> is +returned. =cut */ @@ -2886,7 +2888,7 @@ Perl_get_hv(pTHX_ const char *name, I32 flags) PERL_ARGS_ASSERT_GET_HV; - if (flags) + if (flags & ~SVf_UTF8) return GvHVn(gv); if (gv) return GvHV(gv); |