patch 8.1.0785: depending on the configuration some functions are unused
Problem: Depending on the configuration some functions are unused.
Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle,
closes #3822)
diff --git a/src/json.c b/src/json.c
index ff66411..6ed11ad 100644
--- a/src/json.c
+++ b/src/json.c
@@ -54,6 +54,7 @@
return ga.ga_data;
}
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Encode ["nr", "val"] into a JSON format string in allocated memory.
* "options" can contain JSON_JS, JSON_NO_NONE and JSON_NL.
@@ -83,6 +84,7 @@
list_unref(listtv.vval.v_list);
return ga.ga_data;
}
+#endif
static void
write_string(garray_T *gap, char_u *str)
@@ -1082,6 +1084,7 @@
return OK;
}
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Decode the JSON from "reader" and store the result in "res".
* "options" can be JSON_JS or zero;
@@ -1102,6 +1105,7 @@
return ret;
}
+#endif
/*
* Decode the JSON from "reader" to find the end of the message.