Return-Path: Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 53194 invoked by uid 500); 29 Jan 2002 05:40:33 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 53183 invoked from network); 29 Jan 2002 05:40:32 -0000 Message-ID: <3C5635D7.6070106@stason.org> Date: Tue, 29 Jan 2002 13:40:39 +0800 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en-us MIME-Version: 1.0 Cc: dev@perl.apache.org Subject: Re: Apache::Util::size_string issues References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Doug MacEachern wrote: > On Tue, 29 Jan 2002, Stas Bekman wrote: > >>like this? >> > > yeah, but i'm not sure it's worth it for such a small string. in fact, i > think it is a loss, see comment in sv.c: > /* > * Check to see if we can just swipe the string. If so, it's a > * possible small lose on short strings, but a big win on long ones. > * It might even be a win on short strings if SvPVX(dstr) > * has to be allocated and SvPVX(sstr) has to be freed. > */ > > probably best to stick with your original. ok >>>>Also apr_strfsize is in the APR::Strings module in the map file. Should >>>>we have APR::Strings::strfsize instead of Apache__Util_size_string. >>>> > > that is probably the right place. but Apache::String::format_size has a > better ring to it. either that or just group it with APR::Util (as > APR::Util::strfsize), where the current APR::Lib functions are supposed to > move to. Since we have a potentially growing number of Util functions, may be it's better not to throw all the functions into one namespace? So in this case we could make something like Apache::StringUtil or Apache::UtilString? Because if for example you look at APR::Table, it's a util too. In any case I'll go with Apache::Util::format_size and later we can change it. Sounds OK? Apache::Util::size_string as a wrapper. _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org