Re: [xml] xmlCleanupParser() question / patch

2010-01-20 Thread Rob Richards
Daniel Veillard wrote: On Thu, Jan 14, 2010 at 02:59:50AM +0100, Aron Szabo wrote: Hi! If I use the library in a threaded program and call xmlCleanupParser() I can't reinitialize it. So here's what happens: 1. xmlCleanupThreads() is called from xmlCleanupParser() 2. the global key is

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Martin B.
Daniel Veillard wrote: On Thu, Jan 14, 2010 at 02:59:50AM +0100, Aron Szabo wrote: Hi! If I use the library in a threaded program and call xmlCleanupParser() I can't reinitialize it. So here's what happens: 1. xmlCleanupThreads() is called from xmlCleanupParser() 2. the global key is deleted

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread James Hart
Do you suspect that there are more broken implementation vs. implementations correctly using xmlCleanupParser? The proposed change would break correctly implemented systems, but still compile and be hard to detect. Shouldn't correctly implemented systems be favored over the broken ones? For

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Daniel Veillard
On Tue, Jan 19, 2010 at 03:40:30PM +0100, Martin B. wrote: Daniel Veillard wrote: On Thu, Jan 14, 2010 at 02:59:50AM +0100, Aron Szabo wrote: Hi! If I use the library in a threaded program and call xmlCleanupParser() I can't reinitialize it. So here's what happens: 1.

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Martin B.
Daniel Veillard wrote: On Tue, Jan 19, 2010 at 03:40:30PM +0100, Martin B. wrote: Daniel Veillard wrote: On Thu, Jan 14, 2010 at 02:59:50AM +0100, Aron Szabo wrote: Hi! If I use the library in a threaded program and call xmlCleanupParser() I can't reinitialize it. So here's what happens:

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Mike Hommey
On Tue, Jan 19, 2010 at 04:38:24PM +0100, Martin B. wrote: That is impossible, for ABI compatibility, Ah OK. In that case the best thing would be to have the function in the ABI but get a compiler error if it's used with the newer headers. Don't have a clue how that could magically be

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Daniel Veillard
On Tue, Jan 19, 2010 at 07:54:20AM -0700, James Hart wrote: Do you suspect that there are more broken implementation vs. implementations correctly using xmlCleanupParser? The proposed change The point is about brokeness, missing xmlCleanupParser results just in a minimal leak for remaining

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Daniel Veillard
On Tue, Jan 19, 2010 at 04:38:24PM +0100, Martin B. wrote: Daniel Veillard wrote: Best thing would be if xmlCleanupParser() would be removed completely, no? That is impossible, for ABI compatibility, Ah OK. In that case the best thing would be to have the function in the ABI but get a

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Aron Szabo
Hi! I don't know if it exists the library should have a get_version function so versions can be fetched from dynamic libraries. My opinion is to just remove the thread cleanup function from xmlCleanupParser() and modify the documentation. Actually the documentation

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Aleksey Sanin
I am sure you know about __attribute__ ((deprecated)) :) Aleksey On 1/19/2010 7:47 AM, Daniel Veillard wrote: On Tue, Jan 19, 2010 at 04:38:24PM +0100, Martin B. wrote: Daniel Veillard wrote: Best thing would be if xmlCleanupParser() would be removed completely, no? That is impossible,

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread Martin B.
Aleksey Sanin wrote: I am sure you know about __attribute__ ((deprecated)) :) This is gcc, right? I just discovered that the Microsoft compiler apparently has __declspec(deprecated) for this purpose. br, Martin Aleksey On 1/19/2010 7:47 AM, Daniel Veillard wrote: On Tue, Jan 19, 2010

Re: [xml] xmlCleanupParser() question / patch

2010-01-19 Thread James Hart
Hmm ... but this point of view would mean that the whole mechanism for this function is bad for a shared-lib environment, no matter how it's called. So I could think of this: * xmlInitParser() and xmlCleanupParser() get deprecated (via the various compiler specific attributes) *