diff options
author | Zefram <zefram@fysh.org> | 2017-08-08 20:06:11 +0100 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-08-08 21:38:16 +0100 |
commit | a83b92fa8845fe243b594cefd53ec906a9de17a6 (patch) | |
tree | 94cebd94116c4f4eefb2a73e63ebc0fe62794552 /universal.c | |
parent | 71c697dea4f5a96ca9a9867eef07455c74f502f5 (diff) | |
download | perl-a83b92fa8845fe243b594cefd53ec906a9de17a6.tar.gz |
use cv_set_call_checker_flags() where possible
Call checkers established by core code were being set through
cv_set_call_checker(), so requiring GVs to be created in some cases where
they could be avoided. Make all the checkers non-GV-namegv capable,
and set them with cv_set_call_checker_flags().
The checkers for Devel::Peek::Dump() and
utf8::{unicode_to_native,native_to_unicode}() were already fit to handle
non-GV names, so required no changes. The checker for CORE:: subs,
ck_entersub_args_core(), was naughtily using the name to decide which sub
it was dealing with in some cases, so move that information into the ckobj
that was already being used to identify the sub in most cases. It also
required reformulation of some error reporting code to use cv_name().
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/universal.c b/universal.c index 6ee65a6a11..65477fb775 100644 --- a/universal.c +++ b/universal.c @@ -1089,12 +1089,12 @@ Perl_boot_core_UNIVERSAL(pTHX) CV* to_native_cv = get_cv("utf8::unicode_to_native", 0); CV* to_unicode_cv = get_cv("utf8::native_to_unicode", 0); - cv_set_call_checker(to_native_cv, + cv_set_call_checker_flags(to_native_cv, optimize_out_native_convert_function, - (SV*) to_native_cv); - cv_set_call_checker(to_unicode_cv, + (SV*) to_native_cv, 0); + cv_set_call_checker_flags(to_unicode_cv, optimize_out_native_convert_function, - (SV*) to_unicode_cv); + (SV*) to_unicode_cv, 0); } #endif |