[Opensrf-commits] r1086 - in trunk: include/opensrf src/libopensrf
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 27 20:34:03 EDT 2007
Author: miker
Date: 2007-08-27 20:28:22 -0400 (Mon, 27 Aug 2007)
New Revision: 1086
Modified:
trunk/include/opensrf/osrf_json.h
trunk/src/libopensrf/osrf_json_tools.c
Log:
patch from Scott McKellar to use const pointer qualification during object serialization
Modified: trunk/include/opensrf/osrf_json.h
===================================================================
--- trunk/include/opensrf/osrf_json.h 2007-08-19 13:54:43 UTC (rev 1085)
+++ trunk/include/opensrf/osrf_json.h 2007-08-28 00:28:22 UTC (rev 1086)
@@ -336,7 +336,7 @@
/* ------------------------------------------------------------------------- */
/**
- * The following methods provide a ficility for serializing and
+ * The following methods provide a facility for serializing and
* deserializing "classed" JSON objects. To give a JSON object a
* class, simply call jsonObjectSetClass().
* Then, calling jsonObjectEncodeClass() will convert the JSON
@@ -362,7 +362,7 @@
* class-wrapped (serialized) object
* Caller must free the returned object
*/
-jsonObject* jsonObjectEncodeClass( jsonObject* obj );
+jsonObject* jsonObjectEncodeClass( const jsonObject* obj );
/* ------------------------------------------------------------------------- */
Modified: trunk/src/libopensrf/osrf_json_tools.c
===================================================================
--- trunk/src/libopensrf/osrf_json_tools.c 2007-08-19 13:54:43 UTC (rev 1085)
+++ trunk/src/libopensrf/osrf_json_tools.c 2007-08-28 00:28:22 UTC (rev 1086)
@@ -15,7 +15,7 @@
#include <opensrf/osrf_json.h>
-jsonObject* _jsonObjectEncodeClass( jsonObject* obj, int ignoreClass );
+jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClass );
jsonObject* jsonObjectFindPath( const jsonObject* obj, char* path, ...);
@@ -126,11 +126,11 @@
return newObj;
}
-jsonObject* jsonObjectEncodeClass( jsonObject* obj ) {
+jsonObject* jsonObjectEncodeClass( const jsonObject* obj ) {
return _jsonObjectEncodeClass( obj, 0 );
}
-jsonObject* _jsonObjectEncodeClass( jsonObject* obj, int ignoreClass ) {
+jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClass ) {
//if(!obj) return NULL;
if(!obj) return jsonNewObject(NULL);
More information about the opensrf-commits
mailing list