From 972f3ea3a2e0de36ce00a634c1a70c008f38a00c Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 28 Aug 2007 00:28:22 +0000 Subject: [PATCH] patch from Scott McKellar to use const pointer qualification during object serialization git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1086 9efc2488-bf62-4759-914b-345cdb29e865 --- include/opensrf/osrf_json.h | 4 ++-- src/libopensrf/osrf_json_tools.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/opensrf/osrf_json.h b/include/opensrf/osrf_json.h index 6c6e489..23eabda 100644 --- a/include/opensrf/osrf_json.h +++ b/include/opensrf/osrf_json.h @@ -336,7 +336,7 @@ jsonObject* jsonParseFile( char* filename ); /* ------------------------------------------------------------------------- */ /** - * 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 @@ jsonObject* jsonObjectDecodeClass( jsonObject* obj ); * class-wrapped (serialized) object * Caller must free the returned object */ -jsonObject* jsonObjectEncodeClass( jsonObject* obj ); +jsonObject* jsonObjectEncodeClass( const jsonObject* obj ); /* ------------------------------------------------------------------------- */ diff --git a/src/libopensrf/osrf_json_tools.c b/src/libopensrf/osrf_json_tools.c index 5476bba..b37bd97 100644 --- a/src/libopensrf/osrf_json_tools.c +++ b/src/libopensrf/osrf_json_tools.c @@ -15,7 +15,7 @@ GNU General Public License for more details. #include -jsonObject* _jsonObjectEncodeClass( jsonObject* obj, int ignoreClass ); +jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClass ); jsonObject* jsonObjectFindPath( const jsonObject* obj, char* path, ...); @@ -126,11 +126,11 @@ jsonObject* jsonObjectDecodeClass( jsonObject* obj ) { 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); -- 2.11.0