From: miker Date: Tue, 1 Jan 2008 01:34:54 +0000 (+0000) Subject: Patch from Scott McKellar which adds some const-correctness. X-Git-Tag: osrf_rel_2_0_1~779 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=31fb3b44c0f0a0df6554baab3456f6ba55651a1b;p=OpenSRF.git Patch from Scott McKellar which adds some const-correctness. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1188 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/include/opensrf/osrf_json.h b/include/opensrf/osrf_json.h index d13a54b..51e76cd 100644 --- a/include/opensrf/osrf_json.h +++ b/include/opensrf/osrf_json.h @@ -337,7 +337,7 @@ char* jsonFormatString( const char* jsonString ); /* sets the error handler for all parsers */ void jsonSetGlobalErrorHandler(void (*errorHandler) (const char*)); -jsonObject* jsonParseFile( char* filename ); +jsonObject* jsonParseFile( const char* filename ); /* ------------------------------------------------------------------------- */ /** diff --git a/src/libopensrf/osrf_json_tools.c b/src/libopensrf/osrf_json_tools.c index 35ce3c9..76b5c41 100644 --- a/src/libopensrf/osrf_json_tools.c +++ b/src/libopensrf/osrf_json_tools.c @@ -168,7 +168,7 @@ static jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClas return newObj; } -jsonObject* jsonParseFile( char* filename ) { +jsonObject* jsonParseFile( const char* filename ) { if(!filename) return NULL; char* data = file_to_string(filename); jsonObject* o = jsonParseString(data);