]> git.evergreen-ils.org Git - OpenSRF.git/commit
Patch from Scott McKellar (including commentary):
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 31 Jan 2008 19:46:21 +0000 (19:46 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 31 Jan 2008 19:46:21 +0000 (19:46 +0000)
commitebae6a6fda327427cdd163716b658af36cbdaa46
treeb37700b86e53c64bf531797474ff1f0dd0e52d53
parent83f84889c8b7a32f6eec03c0fe8f7eeb54353724
Patch from Scott McKellar (including commentary):

1. I added the const qualifier to the second parameter of xmlSaxAttr().

2. I moved the prototype of _xmlToJSON() from the header to the
implementation file, and made the function static.

At least in its present form, _xmlToJSON should not be part of the
public interface because it is confusing.  Sometimes it allocates a
new jsonObject, which needs to be freed, and sometimes it doesn't.

A better design would be for it to expect to receive a non-NULL pointer
to an existing jsonObject.  Since it is called in only one place
(other than a couple of recursive calls), this would be an easy
change to make.  However I left it alone -- as long as the function
is visible only from within its own source file, the potential for
confusion is limited.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1244 9efc2488-bf62-4759-914b-345cdb29e865
include/opensrf/xml_utils.h
src/libopensrf/xml_utils.c