> At 16.21 26/02/2004 -0800, James Berry wrote: >>Since a single global LCP transcoder is used by XMLString (and another by >>DOMString) it would appear that LCP transcoders, anyway, must be >> re-entrant. >> >>Can somebody backup my assertion? > > Yes, I always assumed this (and usually, the LCP transcoder is just a > wrapper for some OS-specific API, with no fields defined in the class > definition).
Yes, but this is based on the assumption that the implementation of the OS-specific API is re-entrant. And in Xerces. I have reason to doubt that this assumption is sound. For instance, a number of files in directory xerces_c/src/xercesc/util/Transcoders/ refer to wcstombs(). On my RH9 system, the man page for wcstombs contains the following NOTE: "The function wcsrtombs provides a thread safe interface to the same functionality". According to the man pages, the difference between these functions is that wcsrtombs is passed an additional argument "mbstate_t *ps", with the following comments: "In both of the above cases, if ps is a NULL pointer, a static anonymous state only known to the wcsrtombs function is used instead. Passing NULL as ps is not multi-thread safe.". My guess is that passing NULL for ps is what wcstombs (without the 'r') does, making it non-reentrant. Just my 0.02 Jeroen. > > >>And does anybody claim that transcoders adhering to the virtual >>transcoding API would for any reason also need to be re-entrant? > > I would say that the transcoding interface does not require its > implementation to be re-entrant; only the implementation for the local > code > page must. If some code asks for a specific transcoder, it is supposed to > access it in a thread-safe way. > > BTW, that's only my opinion... > > Alberto > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]