diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-20 15:30:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-20 15:30:40 +0100 |
commit | 113e10721f42fc2500b63fe95193f8665658a90c (patch) | |
tree | 4395acb733cc8d7a798df8f4a91c5c1afa084841 /src/json.c | |
parent | 1f20daa1d784e2d8ae13db5b9c8abbb648dd2a03 (diff) |
patch 8.1.0785: depending on the configuration some functions are unusedv8.1.0785
Problem: Depending on the configuration some functions are unused.
Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle,
closes #3822)
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index ff66411261..6ed11ad42e 100644 --- a/src/json.c +++ b/src/json.c @@ -54,6 +54,7 @@ json_encode(typval_T *val, int options) 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 @@ json_encode_nr_expr(int nr, typval_T *val, int options) 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 @@ json_decode_all(js_read_T *reader, typval_T *res, int options) 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 @@ json_decode(js_read_T *reader, typval_T *res, int options) return ret; } +#endif /* * Decode the JSON from "reader" to find the end of the message. |