On Tue Sep 25 16:04:17 2012, sprout wrote: > On Tue Sep 11 21:40:39 2012, sprout wrote: > > On Tue Sep 11 20:36:54 2012, sprout wrote: > > > On Mon Sep 10 15:31:28 2012, perl@profvince.com wrote: > > > > The test that started to fail with this commit does a substr() on an > > > > unicode string that has get and len magic callbacks. Before the change > > > > len magic was called, now it isn't anymore. Is this is the expected > > > > behaviour after this change? I have no idea whatsoever on what is > > > > supposed to be correct, but I'd like to double check so that nothing > > > > bad > > > > goes unnoticed. > > > > > > I don’t fully understand len magic. I think its purpose it to optimise > > > the retrieval of the length, so whether it does or does not get called > > > is likely to change willy-nilly over time. > > > > I have just had a look at mg_length. It falls back to get-magic > > (indirectly via SvPV_const) in the absence of length magic. So it seems > > to me it is never correct for both mg_get and mg_length both to be > > called for the same operation. > > > > So you can go ahead change your tests. > > > > In fact, since the mg_length may turn on the UTF8 flag, yet it does not > > provide the pv, most uses of mg_length are probably wrong. > > Actually, I am probably going to yank most uses of length magic from the > core, so you might want to hold off on making a release, since I suspect > you’ll have to adjust other tests, too. Length magic is now dead. I don’t think I’ll be magic any more changes now, so you can *finally* go and adjust your tests. The responsible commits are 57e30c7a9fde, bd8446cfd, c9d50bb49b0 and 9bb29b6866. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=114690Thread Previous | Thread Next