]> git.evergreen-ils.org Git - OpenSRF.git/commit
Performance tweak to jsonIterator.
authorscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 5 Aug 2009 12:53:19 +0000 (12:53 +0000)
committerscottmk <scottmk@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 5 Aug 2009 12:53:19 +0000 (12:53 +0000)
commitbf2398c1486ec9fd284293df00f72e743e77996e
treec9fbe0ec26533defc14e15cc2b55ee3d43a59289
parent700b4c54fd13305912d9f364eeecb1c5a72b8261
Performance tweak to jsonIterator.

Instead of storing a malloc'd copy of the key of a JSON_HASH entry,
just store a const pointer to the key string stored in the
internal osrfHash.  That way we don't have to do a malloc and
free every time we bump the iterator.

This change also requires the addition of a couple of const qualifiers
in the client code.

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