Re: Apache::Util::size_string issues

2002-01-28 Thread Stas Bekman
Doug MacEachern wrote: > On Tue, 29 Jan 2002, Stas Bekman wrote: > > >>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::UtilStr

Re: Apache::Util::size_string issues

2002-01-28 Thread Doug MacEachern
On Tue, 29 Jan 2002, Stas Bekman wrote: > 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 exampl

Re: [Fwd: Re: an interface for apr_array_header]

2002-01-28 Thread Doug MacEachern
On Tue, 29 Jan 2002, Stas Bekman wrote: > So can we remove it from todo? sure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Apache::Util::size_string issues

2002-01-28 Thread Stas Bekman
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 >

Re: Apache::Util::size_string issues

2002-01-28 Thread Doug MacEachern
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 string

[Fwd: Re: an interface for apr_array_header]

2002-01-28 Thread Stas Bekman
Doug MacEachern wrote: > On Tue, 29 Jan 2002, Stas Bekman wrote: > > >>I was looking at adding the Perl API for apr_array_header_t, per >>todo/api.txt entry. >> >>Is there any use for this functionality in Perl? >> > > i think i had only array_headers of char * in mind, like what ap_req

Re: an interface for apr_array_header

2002-01-28 Thread Doug MacEachern
On Tue, 29 Jan 2002, Stas Bekman wrote: > I was looking at adding the Perl API for apr_array_header_t, per > todo/api.txt entry. > > Is there any use for this functionality in Perl? i think i had only array_headers of char * in mind, like what ap_requires returns. but it probably isn't worth d

Re: Apache::Util::size_string issues

2002-01-28 Thread Stas Bekman
Doug MacEachern wrote: > On Mon, 28 Jan 2002, Stas Bekman wrote: > > >>static MP_INLINE >>SV *mpxs_Apache__Util_size_string(pTHX_ apr_off_t size) >>{ >> char buff[5]; >> >> apr_strfsize(size, buff); >> >> return newSVpvn(buff, 4); >>} >> > > that'd be fine. i'd probably use mpxs

Re: [patch] APR::Date funcs

2002-01-28 Thread Doug MacEachern
On Tue, 29 Jan 2002, Stas Bekman wrote: > - building APR::Date with apr_date_parse_* functions > - hiding the internal apr_date_checkmask > - adding tests for APR::Date looks good, +1 > - moving ap_ht_time to Apache::Time (preparing for the wrapper) that's fine, but would rather see it as par

Re: Apache::Util porting issues

2002-01-28 Thread Doug MacEachern
On Mon, 28 Jan 2002, Stas Bekman wrote: > here is the patch. +1 > Shouldn't this: > > if (in == &PL_sv_undef) { > return NULL; > } > > in modperl_xs_sv2request_rec() be removed too? This case is already > handled in the third if() and allows for the same trick of getting

Re: Apache::Util::size_string issues

2002-01-28 Thread Doug MacEachern
On Mon, 28 Jan 2002, Stas Bekman wrote: > static MP_INLINE > SV *mpxs_Apache__Util_size_string(pTHX_ apr_off_t size) > { > char buff[5]; > > apr_strfsize(size, buff); > > return newSVpvn(buff, 4); > } that'd be fine. i'd probably use mpxs_set_targ instead, but that can be lat

Re: [patch] escape fmt strings

2002-01-28 Thread Stas Bekman
Doug MacEachern wrote: > On Mon, 28 Jan 2002, Stas Bekman wrote: > > >>If I'm using undefined %size_string var in some test.pm I get this core: >> > ... > >>I'm not sure whether this is the best way to solve this problem, but >>consider this patch. (I've copied parts of the code from embedper

an interface for apr_array_header

2002-01-28 Thread Stas Bekman
I was looking at adding the Perl API for apr_array_header_t, per todo/api.txt entry. Is there any use for this functionality in Perl? apr_array_* functions provide no interface for manipulating a single array, but mainly functions for merging, copying arrays. It also requires the size of the elem

Re: [patch] escape fmt strings

2002-01-28 Thread Doug MacEachern
On Mon, 28 Jan 2002, Stas Bekman wrote: > > If I'm using undefined %size_string var in some test.pm I get this core: ... > I'm not sure whether this is the best way to solve this problem, but > consider this patch. (I've copied parts of the code from embedperl > manpage). I'm not sure if this

[patch] APR::Date funcs

2002-01-28 Thread Stas Bekman
- building APR::Date with apr_date_parse_* functions - hiding the internal apr_date_checkmask - adding tests for APR::Date - moving ap_ht_time to Apache::Time (preparing for the wrapper) Index: src/modules/perl/modperl_apache_includes.h ===

[patch] escape fmt strings

2002-01-28 Thread Stas Bekman
If I'm using undefined %size_string var in some test.pm I get this core: #0 0x40307291 in strlen () from /lib/libc.so.6 #1 0x400300aa in apr_vformatter (flush_func=0x400308c0 , vbuff=0xbfffd1e8, fmt=0x86c8478 "size_string\" requires explicit package name at /home/stas/apache.org/mp-