diff options
author | 2011-03-20 01:53:13 +0000 | |
---|---|---|
committer | 2011-03-20 01:53:13 +0000 | |
commit | 7414bc8cc78c3f0e0bb68794e75d5561adee3cd6 (patch) | |
tree | f3ab24b80675888f4c122d4d4e2781359e13d919 | |
parent | c93b44bde4c2a5405fe847b9dea65d860fa2bb6c (diff) | |
download | paludis-7414bc8cc78c3f0e0bb68794e75d5561adee3cd6.tar.gz paludis-7414bc8cc78c3f0e0bb68794e75d5561adee3cd6.tar.xz |
Work with Jansson 2.0
-rw-r--r-- | paludis/repositories/gemcutter/json_things.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/repositories/gemcutter/json_things.cc b/paludis/repositories/gemcutter/json_things.cc index e7c1d0db1..182f05b77 100644 --- a/paludis/repositories/gemcutter/json_things.cc +++ b/paludis/repositories/gemcutter/json_things.cc @@ -73,7 +73,11 @@ gemcutter_json_things_parse_all_gems( Context context("When parsing '" + stringify(path) + "':"); json_error_t error; +#if JANSSON_MAJOR_VERSION >= 2 + json_t * root(json_load_file(stringify(path).c_str(), 0, &error)); +#else json_t * root(json_load_file(stringify(path).c_str(), &error)); +#endif if (! root) throw JSONError("Couldn't load '" + stringify(path) + "': jansson said: " + error.text); |