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