]> granicus.if.org Git - json-c/commitdiff
* Make json_object_from_file take const char *filename
authorMichael Clark <michael@metaparadigm.com>
Thu, 27 Aug 2009 06:40:59 +0000 (06:40 +0000)
committerMichael Clark <michael@metaparadigm.com>
Thu, 27 Aug 2009 06:40:59 +0000 (06:40 +0000)
    Spotted by Vikram Raj V, vsagar at attinteractive dot com

git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@55 327403b1-1117-474d-bef2-5cb71233fd97

json_util.c
json_util.h

index af6f3d6e4d7a87ffc350fde91b824e08910d784a..06e4a71c98c8b26f34167255c43e22f0baffcde8 100644 (file)
@@ -52,7 +52,7 @@
 #include "json_tokener.h"
 #include "json_util.h"
 
-struct json_object* json_object_from_file(char *filename)
+struct json_object* json_object_from_file(const char *filename)
 {
   struct printbuf *pb;
   struct json_object *obj;
index 6ab0287e41ced85c797cdaf817bec96ff25e5913..134390f6bed5c9eab509f6f61164f804a0f2b877 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
 #define JSON_FILE_BUF_SIZE 4096
 
 /* utility functions */
-extern struct json_object* json_object_from_file(char *filename);
+extern struct json_object* json_object_from_file(const char *filename);
 extern int json_object_to_file(char *filename, struct json_object *obj);
 
 #ifdef __cplusplus