Re: [xml] libxml2 thread safety (SUMMARY)



On Wed,  3 October 12:47 Daniel Veillard wrote:

  My personal inclination as I explained yesterday would be:
    - to keep all global settings in a new structure
    - that structure is accessed using an overridable function returning
      a pointer to that structure
    - the old name for the global variable is turned into a macro
      dereferencing the pointer returned by that function (I think
      this will keep the read/write capability of that property).

That is almost exactly the approach for making the global variable 'errno'
thread safe (except its just one variable rather than a structure).

Brian Stafford




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