pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/grive Match newer json-c interface.
details: https://anonhg.NetBSD.org/pkgsrc/rev/8b79c87474e7
branches: trunk
changeset: 439230:8b79c87474e7
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Sep 14 18:20:57 2020 +0000
description:
Match newer json-c interface.
diffstat:
net/grive/distinfo | 4 +-
net/grive/patches/patch-libgrive_src_protocol_Json.cc | 66 ++++++++++++++++++-
2 files changed, 66 insertions(+), 4 deletions(-)
diffs (93 lines):
diff -r 783b546e05c0 -r 8b79c87474e7 net/grive/distinfo
--- a/net/grive/distinfo Mon Sep 14 18:19:38 2020 +0000
+++ b/net/grive/distinfo Mon Sep 14 18:20:57 2020 +0000
@@ -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 -r 783b546e05c0 -r 8b79c87474e7 net/grive/patches/patch-libgrive_src_protocol_Json.cc
--- a/net/grive/patches/patch-libgrive_src_protocol_Json.cc Mon Sep 14 18:19:38 2020 +0000
+++ b/net/grive/patches/patch-libgrive_src_protocol_Json.cc Mon Sep 14 18:20:57 2020 +0000
@@ -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 @@
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 <>
Home |
Main Index |
Thread Index |
Old Index