Re: [xml] Per parser xmlGcMemSetup

On Sat, May 05, 2007 at 03:16:54PM +0200, Joachim Zobel wrote:
Am Samstag, den 05.05.2007, 07:06 -0400 schrieb Rob Richards:
- Try not to use globals. Many functions have been added over the years 
that allow settings/options to be passed directly eliminating the need 
to use globals.

I would prefer not to use globals. The problem I have to deal with is
that my module calls the SAX2 callbacks (from SAX2.c). These callbacks
assume the memory that is passed to them has been allocated by libxml2,
  if you're calling the callbacks from libxml2 just to build a tree it's
bad, either use one of the parsers or build the tree with the tree API.
Other uses are not suported, in the sense that I may break randomly 
how the callback works. 
  I don't know why you are doing this but this sounds extremely fishy,
would you care to explain, because I'm trying to guess and mostly I see
only bad reasons.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
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]