Re: [xml] Re: How to detect at run-time whether libxml2 was compiled with enabled mutlithreading support?



On Sat, Sep 03, 2005 at 02:56:46PM +0200, Bjorn Reese wrote:
Daniel Veillard wrote:

 Idea is good, implementation not so. The function goes into threads.c
and the declaration in the system independant <libxml/threads.h> include.
I integrated it but not by applying your patch,

I haven't seen how you have integrated it, so I may be suggesting what
you have already done, but just in case you haven't...

How about generalizing this functionality to return, not only threading,
but any feature that can be omitted at compile time? For example:

  enum xmlFeature {
    XML_FEATURE_MULTITHREADING,
    XML_FEATURE_XPATH
    /* Etc. etc. */
  };

  int xmlHasFeature(xmlFeature);

 I just used the function as provided in the patch initially
int
xmlIsThreadsEnabled(void)
{
#ifdef LIBXML_THREAD_ENABLED
    return 1;
#else
    return 0;
#endif
}

  i.e. basic, minimal. Your suggestion has vertues, it does make sense
and it's not too late to provide something like that instead.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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