[Opensrf-commits] r1659 - trunk/src/libopensrf (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 11 21:46:11 EST 2009
Author: scottmk
Date: 2009-02-11 21:46:10 -0500 (Wed, 11 Feb 2009)
New Revision: 1659
Modified:
trunk/src/libopensrf/osrf_json_object.c
Log:
1. Added a missing #include
2. In jsonNewIterator(): initialize hashItr to NULL
if the object is not a JSON_HASH
Modified: trunk/src/libopensrf/osrf_json_object.c
===================================================================
--- trunk/src/libopensrf/osrf_json_object.c 2009-02-09 16:13:57 UTC (rev 1658)
+++ trunk/src/libopensrf/osrf_json_object.c 2009-02-12 02:46:10 UTC (rev 1659)
@@ -20,6 +20,7 @@
#include <opensrf/log.h>
#include <opensrf/osrf_json.h>
#include <opensrf/osrf_json_utils.h>
+#include <opensrf/osrf_utf8.h>
/* cleans up an object if it is morphing another object, also
* verifies that the appropriate storage container exists where appropriate */
@@ -382,12 +383,14 @@
jsonIterator* itr;
OSRF_MALLOC(itr, sizeof(jsonIterator));
- itr->obj = (jsonObject*) obj;
- itr->index = 0;
- itr->key = NULL;
+ itr->obj = (jsonObject*) obj;
+ itr->index = 0;
+ itr->key = NULL;
if( obj->type == JSON_HASH )
itr->hashItr = osrfNewHashIterator(obj->value.h);
+ else
+ itr->hashItr = NULL;
return itr;
}
More information about the opensrf-commits
mailing list