Re: [xml] libxml2/libxslt: global variables considered harmful

On Wed, Jul 14, 2010 at 02:07:42PM +0200, Michael Stahl wrote:
IMHO such a design would also be possible for libxml2/libxslt, but of
course this would be an incompatible interface change.
usually there isn't much enthusiasm for that kind of thing  :)

  Actually there is a bit of this already, see
it's stored in thread local variables, and access is redirected
via macros when compiling, it solves the problem in most cases but
not all cases. Plus that doesn't fix libxslt which is hit very hard
with the issue.
  Make sure libxml2 is always compiled with thread support.

but if there ever is an opportunity for a libxml3, _please_ get rid of
global variables.

  Rant accepted, the problem is well known, but there is nothing to be
done for libxml2 now it's too late, design is 10+ years old and at the
time the problem did not show up. If I were to do libxml3 then sure,
but I don't see that on the horizon, sorry :-\


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

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