mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-28 05:13:03 +02:00
Update univalue subtree
This commit is contained in:
commit
fa439e88af
@ -12,21 +12,10 @@ an arbitrary depth.
|
|||||||
This class is aligned with the JSON standard, [RFC
|
This class is aligned with the JSON standard, [RFC
|
||||||
7159](https://tools.ietf.org/html/rfc7159.html).
|
7159](https://tools.ietf.org/html/rfc7159.html).
|
||||||
|
|
||||||
## Installation
|
## Library usage
|
||||||
|
|
||||||
This project is a standard GNU
|
This is a fork of univalue used by Bitcoin Core. It is not maintained for usage
|
||||||
[autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html)
|
by other projects. Notably, the API may break in non-backward-compatible ways.
|
||||||
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).
|
|
||||||
|
|
||||||
|
Other projects looking for a maintained library should use the upstream
|
||||||
|
univalue at https://github.com/jgarzik/univalue.
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
std::string s(val_);
|
std::string s(val_);
|
||||||
setStr(s);
|
setStr(s);
|
||||||
}
|
}
|
||||||
~UniValue() {}
|
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ bool ParseInt32(const std::string& str, int32_t *out)
|
|||||||
errno = 0; // strtol will not set errno if valid
|
errno = 0; // strtol will not set errno if valid
|
||||||
long int n = strtol(str.c_str(), &endp, 10);
|
long int n = strtol(str.c_str(), &endp, 10);
|
||||||
if(out) *out = (int32_t)n;
|
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
|
// 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.
|
// platforms the size of these types may be different.
|
||||||
return endp && *endp == 0 && !errno &&
|
return endp && *endp == 0 && !errno &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user