Re: [xml] returning existing handler in xmlNewCharEncodingHandler

On Tue, Feb 10, 2004 at 11:50:02AM +0100, oliverst online de wrote:

patch against encoding.c version 1.77 as discussed with Igor on the list

     * Check for existing handler
    handler = xmlFindCharEncodingHandler(name);

    if (handler != NULL)


So long

  Hum, I might disagree with Igor on this, but it seems to me that
it might be better to call xmlFindCharEncodingHandler() before
calling xmlNewCharEncodingHandler(), rather than changing the semantic
of the existing call. In any case in a multithreaded program it seems
to me that you need to ensure some critical section when changing the
default handlers for an encoding. Usually this is best done at program
startup, but I may have missed something, sorry I couldn't participate
to last week discussion, but after rereading the archive I'm not sure
changing the behaviour is the best thing to do.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]