json-c/json-c-0.9-json_object_from_file.patch

25 lines
954 B
Diff

diff -Naur json-c-0.9.old//json_util.c json-c-0.9//json_util.c
--- json-c-0.9.old//json_util.c 2009-12-15 23:53:18.000000000 +0000
+++ json-c-0.9//json_util.c 2009-12-16 00:37:37.000000000 +0000
@@ -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 -Naur json-c-0.9.old//json_util.h json-c-0.9//json_util.h
--- json-c-0.9.old//json_util.h 2009-12-15 23:53:18.000000000 +0000
+++ json-c-0.9//json_util.h 2009-12-16 00:37:52.000000000 +0000
@@ -21,7 +21,7 @@
#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