diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2013-09-08 13:36:40 -0700 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2013-09-08 13:36:40 -0700 |
commit | b939bd3768aac63dc81b1bfaeb566da28e2447c2 (patch) | |
tree | 807ac031d94168dba9b168b19779e00d9810c971 | |
parent | ef43fe35711a162c31f3f24a16849caeb4d9eb74 (diff) | |
parent | 20e4708c8a28dabfc6b55e926b0c47f9b454550d (diff) | |
download | json-c-b939bd3768aac63dc81b1bfaeb566da28e2447c2.tar.gz |
Merge pull request #97 from pascal-bach/master
Add const qualifiers to json_object_to_file and json_object_to_file_ext
-rw-r--r-- | json_util.c | 4 | ||||
-rw-r--r-- | json_util.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/json_util.c b/json_util.c index cab2f1e..531f9af 100644 --- a/json_util.c +++ b/json_util.c @@ -99,7 +99,7 @@ struct json_object* json_object_from_file(const char *filename) /* extended "format and write to file" function */ -int json_object_to_file_ext(char *filename, struct json_object *obj, int flags) +int json_object_to_file_ext(const char *filename, struct json_object *obj, int flags) { const char *json_str; int fd, ret; @@ -141,7 +141,7 @@ int json_object_to_file_ext(char *filename, struct json_object *obj, int flags) // backwards compatible "format and write to file" function -int json_object_to_file(char *filename, struct json_object *obj) +int json_object_to_file(const char *filename, struct json_object *obj) { return json_object_to_file_ext(filename, obj, JSON_C_TO_STRING_PLAIN); } diff --git a/json_util.h b/json_util.h index b9a69c8..1005e58 100644 --- a/json_util.h +++ b/json_util.h @@ -22,8 +22,8 @@ extern "C" { /* utility functions */ extern struct json_object* json_object_from_file(const char *filename); -extern int json_object_to_file(char *filename, struct json_object *obj); -extern int json_object_to_file_ext(char *filename, struct json_object *obj, int flags); +extern int json_object_to_file(const char *filename, struct json_object *obj); +extern int json_object_to_file_ext(const char *filename, struct json_object *obj, int flags); extern int json_parse_int64(const char *buf, int64_t *retval); extern int json_parse_double(const char *buf, double *retval); |