diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-11-01 09:21:19 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-11-01 09:21:43 -0400 |
commit | ddd46293bd83ed6339dd26ddf886d31eefa1a9b5 (patch) | |
tree | d787ab4aa2518ba2d1859cbbdb05e631f9bf370f | |
parent | b54666c849bad258d92d6d1e45a051d36055681e (diff) | |
parent | fa439e88af944082875e1fdb1cd8bb5a74b88b56 (diff) |
Merge #17324: Update univalue subtree
fa0b3da36cd7cf0aada22f2d459296b81274c2f9 Squashed 'src/univalue/' changes from 7890db99d6..5a58a46671 (MarcoFalke)
Pull request description:
Only change is a performance improvement. See https://github.com/bitcoin-core/univalue/pull/21#issue-333858474 and https://github.com/bitcoin-core/univalue/pull/15#issue-186748173
ACKs for top commit:
jnewbery:
ACK fa439e88af944082875e1fdb1cd8bb5a74b88b56
laanwj:
ACK fa439e88af944082875e1fdb1cd8bb5a74b88b56
Tree-SHA512: 35ea8f76ea4806182949c8eb5a8b652d1aaeec03ee023838e7cb29abcb81c61d59b38f15708564a78574722df57d13f61ef17d0f670a4056819705ef892321e0
-rw-r--r-- | src/univalue/README.md | 21 | ||||
-rw-r--r-- | src/univalue/include/univalue.h | 1 | ||||
-rw-r--r-- | src/univalue/lib/univalue_get.cpp | 2 |
3 files changed, 6 insertions, 18 deletions
diff --git a/src/univalue/README.md b/src/univalue/README.md index 36aa786a4c..7c62c33970 100644 --- a/src/univalue/README.md +++ b/src/univalue/README.md @@ -12,21 +12,10 @@ an arbitrary depth. This class is aligned with the JSON standard, [RFC 7159](https://tools.ietf.org/html/rfc7159.html). -## Installation +## Library usage -This project is a standard GNU -[autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html) -project. Build and install instructions are available in the `INSTALL` -file provided with GNU autotools. - -``` -$ ./autogen.sh -$ ./configure -$ make -``` - -## Design - -UniValue provides a single dynamic RAII C++ object class, -and minimizes template use (contra json_spirit). +This is a fork of univalue used by Bitcoin Core. It is not maintained for usage +by other projects. Notably, the API may break in non-backward-compatible ways. +Other projects looking for a maintained library should use the upstream +univalue at https://github.com/jgarzik/univalue. diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h index 91b104e56e..6080516353 100644 --- a/src/univalue/include/univalue.h +++ b/src/univalue/include/univalue.h @@ -47,7 +47,6 @@ public: std::string s(val_); setStr(s); } - ~UniValue() {} void clear(); diff --git a/src/univalue/lib/univalue_get.cpp b/src/univalue/lib/univalue_get.cpp index eabcf2dad1..0ad6146545 100644 --- a/src/univalue/lib/univalue_get.cpp +++ b/src/univalue/lib/univalue_get.cpp @@ -35,7 +35,7 @@ bool ParseInt32(const std::string& str, int32_t *out) errno = 0; // strtol will not set errno if valid long int n = strtol(str.c_str(), &endp, 10); if(out) *out = (int32_t)n; - // Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow + // Note that strtol returns a *long int*, so even if strtol doesn't report an over/underflow // we still have to check that the returned value is within the range of an *int32_t*. On 64-bit // platforms the size of these types may be different. return endp && *endp == 0 && !errno && |