diff options
author | Zefram <zefram@fysh.org> | 2010-10-03 14:53:16 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-10 17:25:15 -0700 |
commit | d908838680ec40ea0e85f59ee66f5f56a225f9b4 (patch) | |
tree | be5eafa5cf981949a4e4bc308be6797443882229 /global.sym | |
parent | b98b62bccdcb420ec5430eb831023e3d91ab2fa0 (diff) | |
download | perl-d908838680ec40ea0e85f59ee66f5f56a225f9b4.tar.gz |
plugin mechanism to rewrite calls to a subroutine
New magic type PERL_MAGIC_checkcall attaches a function to a CV, which
will be called as the second half of the op checker for an entersub
op calling that CV. Default state, in the absence of this magic,
is to process the CV's prototype if it has one, or apply list context
to all the arguments if not. New API functions cv_get_call_checker()
and cv_set_call_checker() provide a clean interface to this facility,
hiding the internal use of magic.
Expose in the API the new functions rv2cv_op_cv(),
ck_entersub_args_list(), ck_entersub_args_proto(), and
ck_entersub_args_proto_or_list(), which are meaningful segments of
standard entersub op checking and are likely to be useful in plugged-in
call checker functions.
Expose new API function op_contextualize(), which is a public interface
to the internal scalar()/list()/scalarvoid() functions. This API is
likely to be required in most plugged-in call checker functions.
Incidentally add new function mg_free_type(), in the API, which will
remove magic of one type from an SV. (mg_free() removes all magic,
and there isn't anything else more selective.)
Diffstat (limited to 'global.sym')
-rw-r--r-- | global.sym | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/global.sym b/global.sym index 203affb52c..d7b479621c 100644 --- a/global.sym +++ b/global.sym @@ -54,6 +54,9 @@ Perl_cast_i32 Perl_cast_iv Perl_cast_ulong Perl_cast_uv +Perl_ck_entersub_args_list +Perl_ck_entersub_args_proto +Perl_ck_entersub_args_proto_or_list Perl_ck_warner Perl_ck_warner_d Perl_ckwarn @@ -67,6 +70,8 @@ Perl_croak_xs_usage Perl_custom_op_desc Perl_custom_op_name Perl_cv_const_sv +Perl_cv_get_call_checker +Perl_cv_set_call_checker Perl_cv_undef Perl_cvgv_set Perl_cx_dump @@ -302,6 +307,7 @@ Perl_mg_clear Perl_mg_copy Perl_mg_find Perl_mg_free +Perl_mg_free_type Perl_mg_get Perl_mg_length Perl_mg_magical @@ -403,6 +409,7 @@ Perl_new_warnings_bitfield Perl_ninstr Perl_nothreadhook Perl_op_clear +Perl_op_contextualize Perl_op_dump Perl_op_free Perl_op_null @@ -474,6 +481,7 @@ Perl_rsignal Perl_rsignal_state Perl_runops_debug Perl_runops_standard +Perl_rv2cv_op_cv Perl_safesyscalloc Perl_safesysfree Perl_safesysmalloc |