develooper Front page | perl.perl5.porters | Postings from June 2014

Re: [perl #121734]

Thread Previous
Jarkko Hietaniemi
June 5, 2014 01:47
Re: [perl #121734]
Message ID:
On Wednesday-201406-04, 21:22, Jarkko Hietaniemi wrote:
> I've got a better idea than futzing with the futz factor.  Just a minute.

So try the attached patch.  Instead of baking in a futz factor (which 
some system apparently just out-futzed) this tries divining the 
appropriate numbers using the NULL-buffer-zero-count feature of 
strxfrm(), where no actual output is done, only the required length is 

NOTE 1: if the expansion factor of 50 really is not enough, this means 
that for strxfrm() of input of N bytes, Perl will reserve a buffer of 
more than 50 N...

NOTE 2: now that I think of it, if the strxfrm() count-only feature 
really works (see above), then the PL_collxfrm_base and PL_collxfrm_mult 
can be deprecated as such.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About