summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Clark <michael@metaparadigm.com>2009-08-27 06:40:59 +0000
committerMichael Clark <michael@metaparadigm.com>2009-08-27 06:40:59 +0000
commit88ded9ceb8296eb6661c4d6f8f266ac74d81b9c4 (patch)
tree29494ea33ec1640197a833e382e348c537257f4c
parentf5dd43a9d10abb2de50956d23505da08896f0c64 (diff)
downloadjson-c-88ded9ceb8296eb6661c4d6f8f266ac74d81b9c4.tar.gz
* Make json_object_from_file take const char *filename
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
-rw-r--r--json_util.c2
-rw-r--r--json_util.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/json_util.c b/json_util.c
index af6f3d6..06e4a71 100644
--- a/json_util.c
+++ b/json_util.c
@@ -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;
diff --git a/json_util.h b/json_util.h
index 6ab0287..134390f 100644
--- a/json_util.h
+++ b/json_util.h
@@ -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