blob: 101b625fce234fd45762cb58255e3b184124b029 [file] [log] [blame] [edit]
diff -aruN a/src/json.c b/src/json.c
--- a/src/json.c 2010-09-28 06:50:05.000000000 -0700
+++ b/src/json.c 2012-04-05 15:40:51.396325939 -0700
@@ -1134,7 +1134,7 @@
char *
-json_escape (char *text)
+json_escape (const char *text)
{
rcstring *output;
size_t i, length;
@@ -1200,7 +1200,7 @@
char *
-json_unescape (char *text)
+json_unescape (const char *text)
{
char *result = malloc (strlen (text) + 1);
size_t r; /* read cursor */
diff -aruN a/src/json.h b/src/json.h
--- a/src/json.h 2009-12-19 06:16:26.000000000 -0800
+++ b/src/json.h 2012-04-05 15:41:07.076245294 -0700
@@ -277,7 +277,7 @@
@param text an UTF8 char text string
@return an UTF-8 c-string holding the same text string but with escaped characters
**/
- char *json_escape (char *text);
+ char *json_escape (const char *text);
/**
* Outputs a new UTF-8 c-string which has all escaped characters replaced by
@@ -286,7 +286,7 @@
* @param test a UTF-8 c-string
* @return a newly allocated UTF-8 c-string; free with free()
*/
- char *json_unescape (char *text);
+ char *json_unescape (const char *text);
/**