Re: [xml] xmlSplitQName2 problem and patch
- From: Daniel Veillard <veillard redhat com>
- To: Aleksey Sanin <aleksey aleksey com>
- Cc: xml <xml gnome org>
- Subject: Re: [xml] xmlSplitQName2 problem and patch
- Date: Wed, 18 Feb 2004 11:35:33 -0500
On Wed, Feb 18, 2004 at 08:27:35AM -0800, Aleksey Sanin wrote:
But why does this function return NULL in this case?
Shouldn't it return the passed in string (in the same
way as xmlBuildQName() function does)?
Well, that's a serious API change. I would have to modify
all the places where I use xmlSplitQName2(). This means an
API breakage. Just change it the function, and try to run libxml2
and libxslt regression tests. I bet this will lead to various
crashes. Since the implementation of the function matches its
description, I find hard to change this. You can use another function
though, like for example xmlSplitQName3() .
code returns NULL in error case too and this makes
a confusion (IMHO).
"Returns NULL if not a QName" in case of memory allocation
error, an xmlTreeErrMemory() error is raised.
And xmlSplitQName3 voids the problem completely...
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
] [Thread Prev