diff options
author | joerg <joerg@pkgsrc.org> | 2020-09-14 18:20:57 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2020-09-14 18:20:57 +0000 |
commit | 00627a1499cd45ba98c2b0c86ab7f590c8e48d12 (patch) | |
tree | f8dab9cd32d712cb68bc0813e4976e01852aa2ca | |
parent | e019414497e26cb03fd2973d5fbd96b24a921797 (diff) | |
download | pkgsrc-00627a1499cd45ba98c2b0c86ab7f590c8e48d12.tar.gz |
Match newer json-c interface.
-rw-r--r-- | net/grive/distinfo | 4 | ||||
-rw-r--r-- | net/grive/patches/patch-libgrive_src_protocol_Json.cc | 66 |
2 files changed, 66 insertions, 4 deletions
diff --git a/net/grive/distinfo b/net/grive/distinfo index 770d17ad4f1..de0d21ddb1e 100644 --- a/net/grive/distinfo +++ b/net/grive/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.3 2015/11/04 00:35:03 agc Exp $ +$NetBSD: distinfo,v 1.4 2020/09/14 18:20:57 joerg Exp $ SHA1 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = e3059b0ce32ea05d7b5457948317b39358dbb239 RMD160 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = f2a8c3e67f24c01b45ba831f2b3b8c2b5e39fe5c SHA512 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = bd96a02366af47c5fde8e044066616c72a33607818d5e9cf4bea5fe70c0d63f83a2b726ce9a763cb907c78b2a563d7b2296b25e55743288dacef98adea3de729 Size (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = 162471 bytes SHA1 (patch-cmake_Modules_FindJSONC.cmake) = 3038261ef82ad501ffeae18abbba562cc73ae435 -SHA1 (patch-libgrive_src_protocol_Json.cc) = c6a30dd3558a1e054e0486531cc6142e9ad0d263 +SHA1 (patch-libgrive_src_protocol_Json.cc) = 8a37a880493c369aae5ebfbb3e397514c49b7149 SHA1 (patch-libgrive_src_util_OS.cc) = 79cdfe8f89e28901b44c1e8dc5f054a9ca03f061 diff --git a/net/grive/patches/patch-libgrive_src_protocol_Json.cc b/net/grive/patches/patch-libgrive_src_protocol_Json.cc index 037adb80eac..6bc044e0ab4 100644 --- a/net/grive/patches/patch-libgrive_src_protocol_Json.cc +++ b/net/grive/patches/patch-libgrive_src_protocol_Json.cc @@ -1,6 +1,6 @@ -$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.2 2015/03/10 14:08:02 joerg Exp $ +$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.3 2020/09/14 18:20:57 joerg Exp $ -Update for json-c 0.11 and later +Update for json-c 0.14 and later On NetBSD/ARM, int32_t is not long, so add template specialisation for that. --- libgrive/src/protocol/Json.cc.orig 2013-05-02 16:40:04.000000000 +0000 @@ -58,3 +58,65 @@ On NetBSD/ARM, int32_t is not long, so add template specialisation for that. template <> Json::Json( const boost::uint64_t& l ) : m_json( ::json_object_new_int64( l ) ) +@@ -254,7 +282,7 @@ Json Json::operator[]( const std::size_t + bool Json::Has( const std::string& key ) const + { + assert( m_json != 0 ) ; +- return ::json_object_object_get_ex( m_json, key.c_str(), 0 ) == TRUE ; ++ return ::json_object_object_get_ex( m_json, key.c_str(), 0 ); + } + + bool Json::Get( const std::string& key, Json& json ) const +@@ -294,14 +322,14 @@ void Json::Add( const Json& json ) + bool Json::Bool() const + { + assert( m_json != 0 ) ; +- return ::json_object_get_boolean( m_json ) == TRUE ; ++ return ::json_object_get_boolean( m_json ); + } + + template <> + bool Json::Is<bool>() const + { + assert( m_json != 0 ) ; +- return ::json_object_is_type( m_json, json_type_boolean ) == TRUE ; ++ return ::json_object_is_type( m_json, json_type_boolean ); + } + + template <> +@@ -320,7 +348,7 @@ template <> + bool Json::Is<std::string>() const + { + assert( m_json != 0 ) ; +- return ::json_object_is_type( m_json, json_type_string ) == TRUE ; ++ return ::json_object_is_type( m_json, json_type_string ); + } + + template <> +@@ -339,7 +367,7 @@ template <> + bool Json::Is<int>() const + { + assert( m_json != 0 ) ; +- return ::json_object_is_type( m_json, json_type_int ) == TRUE ; ++ return ::json_object_is_type( m_json, json_type_int ); + } + + template <> +@@ -402,7 +430,7 @@ template <> + bool Json::Is<Json::Object>() const + { + assert( m_json != 0 ) ; +- return ::json_object_is_type( m_json, json_type_object ) == TRUE ; ++ return ::json_object_is_type( m_json, json_type_object ); + } + + template <> +@@ -426,7 +454,7 @@ template <> + bool Json::Is<Json::Array>() const + { + assert( m_json != 0 ) ; +- return ::json_object_is_type( m_json, json_type_array ) == TRUE ; ++ return ::json_object_is_type( m_json, json_type_array ); + } + + template <> |