diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-30 08:56:44 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-13 04:49:36 -0800 |
commit | f928b3395fa5dd08d171fbedbbe170f38de76272 (patch) | |
tree | ce01f661c6c72207cce7bf3cfaef45724e08562e /pad.c | |
parent | 2575a0050170c409bc123a30901f3a711bd1802d (diff) | |
download | perl-f928b3395fa5dd08d171fbedbbe170f38de76272.tar.gz |
Update comments about sub(){$x} consting
It no longer has anything to do with constant.pm.
Diffstat (limited to 'pad.c')
-rw-r--r-- | pad.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2241,7 +2241,7 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside) ); if (CvCONST(cv)) { - /* Constant sub () { $x } closing over $x - see lib/constant.pm: + /* Constant sub () { $x } closing over $x: * The prototype was marked as a candiate for const-ization, * so try to grab the current const value, and if successful, * turn into a const sub: @@ -2252,7 +2252,8 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside) SvREFCNT_dec_NN(cv); /* For this calling case, op_const_sv returns a *copy*, which we donate to newCONSTSUB. Yes, this is ugly, and should be killed. - Need to fix how lib/constant.pm works to eliminate this. */ + We need to fix how we decide whether this optimisation is + possible to eliminate this. */ cv = newCONSTSUB(CvSTASH(proto), NULL, const_sv); if (was_method) CvMETHOD_on(cv); |