diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-24 17:56:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-24 17:56:39 +0000 |
commit | d59a8b3e000058b06c6c29b782826d702b04630a (patch) | |
tree | 480fdee8b5c45b768047ba83ffed3614be37c713 /pp_ctl.c | |
parent | 36b0d4988e189eb69539628bc132047fcdcbac92 (diff) | |
download | perl-d59a8b3e000058b06c6c29b782826d702b04630a.tar.gz |
Deprecate sv_compile_2op()
It attempted to provide an API to compile code down to an optree, but failed
to bind correctly to lexicals in the enclosing scope. It's not possible to
fix this problem within the constraints of its parameters and return value.
Searches suggest +that nothing on CPAN is using it, so removing it should have
zero impact.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2982,6 +2982,8 @@ S_docatch(pTHX_ OP *o) called more than once, and is only used by regcomp.c, for (?{}) blocks. Currently it is not used outside the core code. Best if it stays that way. + + Hence it's now deprecated, and will be removed. */ OP * Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) @@ -2989,6 +2991,16 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) /* startop op_free() this to undo. */ /* code Short string id of the caller. */ { + PERL_ARGS_ASSERT_SV_COMPILE_2OP; + return Perl_sv_compile_2op_is_broken(aTHX_ sv, startop, code, padp); +} + +/* Don't use this. It will go away without warning once the regexp engine is + refactored not to use it. */ +OP * +Perl_sv_compile_2op_is_broken(pTHX_ SV *sv, OP **startop, const char *code, + PAD **padp) +{ dVAR; dSP; /* Make POPBLOCK work. */ PERL_CONTEXT *cx; SV **newsp; @@ -3003,7 +3015,7 @@ Perl_sv_compile_2op(pTHX_ SV *sv, OP** startop, const char *code, PAD** padp) STRLEN len; bool need_catch; - PERL_ARGS_ASSERT_SV_COMPILE_2OP; + PERL_ARGS_ASSERT_SV_COMPILE_2OP_IS_BROKEN; ENTER_with_name("eval"); lex_start(sv, NULL, 0); |