apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: cvs commit: apr-util/xlate xlate.c
Date Tue, 30 Mar 2004 13:10:15 GMT
On Tue, Mar 30, 2004 at 07:05:22AM -0500, Jeff Trawick wrote:
> jorton@apache.org wrote:
> >jorton      2004/03/30 01:58:22
> >
> >  Modified:    xlate    xlate.c
> >  Log:
> >  * xlate/xlate.c (check_sbcs): Remove function which made unsafe
> >  assumptions (a theoretical issue), and was buggy in not resetting the
> >  iconv handle on failure (the cause of at least one real issue).
> >  (apr_xlate_open): Updated caller.
> 
> there is some additional work to be done with this...  I have a patch to 
> yank apr_xlate_sb_get() and modify the various apr-util callers of it, but 
> probably won't get it committed until tonight or tomorrow a.m....

Yeah, I was going to commit the more radical changes separately... 
attached what I have.

> apr-util 0.9 will mark the apr_xlate_sb_get() API deprecated, and of course 
> your fix to reset the iconv handle on failure needs to be in 0.9

Actually I thought that the simple removal of check_sbcs() would be
appropriate for 0.9 too, rather than wait for someone to find a case
where it "does the wrong thing".

> additionally, the single-byte conversion routines need to be reworked to 
> not depend on the sbcs table, which now is purely an identity table which 
> is used when the to and from charsets are the same

With just identity tables remaining, conv_byte is either a nullop or an
error, so I removed it.  But you did want to keep it around for a future
where APR has hard-coded single-byte-lookup tables for some
translations?

> but then the identity table use, which was implemented to piggyback on the 
> sbcs "optimization," should be replaced with memcpy() ;)

Indeed, makes it much simpler :)

joe

Mime
View raw message