Support jsoncpp0.5 as well as 0.6

pull/1/merge
Daniel Richman 2012-08-24 18:49:21 +01:00
rodzic 3cdf4b547d
commit 0c98dd02be
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -254,7 +254,11 @@ vector<Json::Value> *Uploader::flights()
map<string,string> options;
Json::Value startkey(Json::arrayValue);
#ifdef JSON_HAS_INT64
startkey.append((Json::Int64) time(NULL));
#else
startkey.append((Json::Int) time(NULL));
#endif
options["include_docs"] = "true";
options["startkey"] = CouchDB::Database::json_query_value(startkey);

Wyświetl plik

@ -58,7 +58,11 @@ void handle_command(const Json::Value &command)
}
else
{
#ifdef JSON_HAS_INT64
int_arg = command[1u].asLargestInt();
#else
int_arg = command[1u].asInt();
#endif
}
try