Skip to content

Commit

Permalink
Squashed 'src/univalue/' changes from 16a1f7f..a44caf65f
Browse files Browse the repository at this point in the history
a44caf65f Merge bitcoin-core/univalue-subtree#28: Import fixes for sanitizer reported issues
135254331 Import fixes for sanitizer reported issues
d5fb86940 refactor: use c++11 range based for loop in checkObject
ff9c37930 refactor: Use nullptr (c++11) instead of NULL
08a99754d build: use ax_cxx_compile_stdcxx.m4 to check for C++11 support
66d3713ce Merge bitcoin-core/univalue-subtree#29: ci: travis -> cirrus
808d48729 ci: travis -> cirrus
c390ac375 Merge bitcoin-core/univalue-subtree#19: Split sources for easier buildsystem integration
4a5b0a1c6 build: Move source entries out to sources.mk
6c7d94b33 build: cleanup wonky gen usage
a222637 Merge dogecoin#23: Merge changes from jgarzik/univalue@1ae6a23
98fadc0 Merge dogecoin#24: Push bool into array correctly
5f03f1f Push bool into array correctly
f77d0f7 Merge commit '1ae6a231a0169938eb3972c1d48dd17cba5947e1' into HEAD
98261b1 Merge dogecoin#22: Clamp JSON object depth to PHP limit
54c4015 Clamp JSON object depth to PHP limit
5a58a46 Merge dogecoin#21: Remove hand-coded UniValue destructor.
b4cdfc4 Remove hand-coded UniValue destructor.
1ae6a23 Merge pull request dogecoin#57 from MarcoFalke/test_fix
92bdd11 univalue_write: remove unneeded sstream.h include
ffb621c Merge pull request dogecoin#56 from drodil/remove_sstream_header
f33acf9 Merge commit '7890db9~' into HEAD
7fba60b Merge dogecoin#17: [docs] Update readme
4577454 Merge dogecoin#13: Fix typo
66e0ade Remove unnecessary sstream header from univalue.h
ac7e73c [docs] Update readme
7890db9 Merge #11: Remove deprecated std pair wrappers
88967f6 Version 1.0.4
40e3485 Merge dogecoin#14: Cleaned up namespace imports to reduce symbol collisions
1dc113d Merge pull request dogecoin#50 from luke-jr/pushKV_bool
72392fb [tests] test pushKV for boolean values
c23132b Pushing boolean value to univalue correctly
4a49647 Fix typo
85052a4 Remove deprecated std::pair wrappers
81faab2 Merge pull request dogecoin#48 from fwolfst/47-UPDATE_MIT_LINK_TO_HTTPS
b17634e Update URLs to MIT license.
51d3ab3 Merge #10: Add pushKV(key, boolean) function (replaces #5)
129bad9 [tests] test pushKV for boolean values
b3c44c9 Pushing boolean value to univalue correctly
07947ff Merge #9: [tests] Fix BOOST_CHECK_THROW macro
ec849d9 [tests] Fix BOOST_CHECK_THROW macro
88ab64f Merge pull request dogecoin#46 from jasonbcox/master
35ed96d Merge pull request dogecoin#44 from MarcoFalke/Mf1709-univalue-cherrypick-explicit
420c226 Merge pull request dogecoin#45 from MarcoFalke/Mf1710-univalue-revert-test
d208f98 Cleaned up namespace imports to reduce symbol collisions
31bc9f5 Merge #8: Remove unused Homebrew workaround
fa04209 Remove HomeBrew workaround
a523e08 Merge #7: Declare single-argument (non-converting) constructors "explicit"
a9e53b3 Merge #4: Pull upstream
fe805ea Declare single-argument (non-converting) constructors "explicit"
8a2d6f1 Merge pull request dogecoin#41 from jgarzik/get-obj-map
ba341a2 Add getObjMap() helper method.  Also, constify checkObject().
ceb1194 Handle .pushKV() and .checkObject() edge cases.
107db98 Add ::push_back(double) method for feature parity.
d415300 Move one-line implementation of UniValue::read() to header.
52e85b3 Move exception-throwing get_* methods into separate implementation module.
dac5296 README.md: update code quotes
3e31dcf README.md: close code quote
d09b842 Update README.md
f1b86ed Convert README to markdown style.
1dfe464 Import UniValue class unit tests from bitcoin project.
0d3e74d operator[] takes size_t index parameter (versus unsigned int)
640158f Private findKey() method becomes size_t clean, and returns bool on failure.
7099135 Merge pull request dogecoin#36 from ryanofsky/pr/end-str
a31231b Version 1.0.3
4fd5444 Reject unterminated strings
81eba33 Merge pull request dogecoin#26 from isle2983/pushBackHelpers
3640541 Merge PR dogecoin#32 from branch 'nul-not-special' of git://github.com/ryanofsky/univalue into merge
89bb073 Merge pull request dogecoin#31 from ryanofsky/raw-literals
511008c Merge pull request dogecoin#30 from ryanofsky/test-driver
77974f3 Merge pull request dogecoin#34 from paveljanik/20161116_Wshadow_codepoint
a38fcd3 Do not shadow member variable codepoint.
fd32d1a Don't require nul-terminated string inputs
0bb1439 Support parsing raw literals in UniValue
28876d0 Merge pull request dogecoin#29 from btcdrak/exportspace
839ccd7 Add test driver for JSONTestSuite
26ef3ff Remove trailing whitespace from JSON export
cfa0384 Convenience wrappers for push_back-ing integer types

git-subtree-dir: src/univalue
git-subtree-split: a44caf65fe55b9dd8ddb08f04c0f70409efd53b3
  • Loading branch information
patricklodder committed Oct 17, 2021
1 parent 2ca7faa commit d29583a
Show file tree
Hide file tree
Showing 31 changed files with 2,194 additions and 687 deletions.
44 changes: 44 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
env:
MAKEJOBS: "-j4"
RUN_TESTS: "true"
BASE_OUTDIR: "$CIRRUS_WORKING_DIR/out_dir_base"
DEBIAN_FRONTEND: "noninteractive"

task:
container:
image: ubuntu:focal
cpu: 1
memory: 1G
greedy: true # https://medium.com/cirruslabs/introducing-greedy-container-instances-29aad06dc2b4

matrix:
- name: "gcc"
env:
CC: "gcc"
CXX: "g++"
APT_PKGS: "gcc"
- name: "clang"
env:
CC: "clang"
CXX: "clang++"
APT_PKGS: "clang"
- name: "mingw"
env:
CC: ""
CXX: ""
UNIVALUE_CONFIG: "--host=x86_64-w64-mingw32"
APT_PKGS: "g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64"
RUN_TESTS: "false"

install_script:
- apt update
- apt install -y pkg-config build-essential libtool autotools-dev automake bsdmainutils
- apt install -y $APT_PKGS
autogen_script:
- ./autogen.sh
configure_script:
- ./configure --cache-file=config.cache --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib $UNIVALUE_CONFIG
make_script:
- make $MAKEJOBS V=1
test_script:
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS distcheck; fi
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

93 changes: 29 additions & 64 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
include sources.mk
ACLOCAL_AMFLAGS = -I build-aux/m4
.PHONY: gen
.PHONY: gen FORCE
.INTERMEDIATE: $(GENBIN)

include_HEADERS = include/univalue.h
noinst_HEADERS = lib/univalue_escapes.h lib/univalue_utffilter.h
include_HEADERS = $(UNIVALUE_DIST_HEADERS_INT)
noinst_HEADERS = $(UNIVALUE_LIB_HEADERS_INT)

lib_LTLIBRARIES = libunivalue.la

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pc/libunivalue.pc

libunivalue_la_SOURCES = \
lib/univalue.cpp \
lib/univalue_read.cpp \
lib/univalue_write.cpp
libunivalue_la_SOURCES = $(UNIVALUE_LIB_SOURCES_INT)

libunivalue_la_LDFLAGS = \
-version-info $(LIBUNIVALUE_CURRENT):$(LIBUNIVALUE_REVISION):$(LIBUNIVALUE_AGE) \
-no-undefined
libunivalue_la_CXXFLAGS = -I$(top_srcdir)/include

TESTS = test/unitester
TESTS = test/object test/unitester test/no_nul

GENBIN = gen/gen$(BUILD_EXEEXT)
GEN_SRCS = gen/gen.cpp
Expand All @@ -29,65 +27,32 @@ $(GENBIN): $(GEN_SRCS)
@echo Building $@
$(AM_V_at)c++ -I$(top_srcdir)/include -o $@ $<

gen: lib/univalue_escapes.h $(GENBIN)
@echo Updating $<
gen: $(GENBIN) FORCE
@echo Updating lib/univalue_escapes.h
$(AM_V_at)$(GENBIN) > lib/univalue_escapes.h

noinst_PROGRAMS = $(TESTS)
noinst_PROGRAMS = $(TESTS) test/test_json

TEST_DATA_DIR=test

test_unitester_SOURCES = test/unitester.cpp
test_unitester_SOURCES = $(UNIVALUE_TEST_UNITESTER_INT)
test_unitester_LDADD = libunivalue.la
test_unitester_CXXFLAGS = -I$(top_srcdir)/include -DJSON_TEST_SRC=\"$(srcdir)/$(TEST_DATA_DIR)\"
test_unitester_CXXFLAGS = -I$(top_srcdir)/include -DJSON_TEST_SRC=\"$(srcdir)/$(UNIVALUE_TEST_DATA_DIR_INT)\"
test_unitester_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

TEST_FILES = \
$(TEST_DATA_DIR)/fail10.json \
$(TEST_DATA_DIR)/fail11.json \
$(TEST_DATA_DIR)/fail12.json \
$(TEST_DATA_DIR)/fail13.json \
$(TEST_DATA_DIR)/fail14.json \
$(TEST_DATA_DIR)/fail15.json \
$(TEST_DATA_DIR)/fail16.json \
$(TEST_DATA_DIR)/fail17.json \
$(TEST_DATA_DIR)/fail18.json \
$(TEST_DATA_DIR)/fail19.json \
$(TEST_DATA_DIR)/fail1.json \
$(TEST_DATA_DIR)/fail20.json \
$(TEST_DATA_DIR)/fail21.json \
$(TEST_DATA_DIR)/fail22.json \
$(TEST_DATA_DIR)/fail23.json \
$(TEST_DATA_DIR)/fail24.json \
$(TEST_DATA_DIR)/fail25.json \
$(TEST_DATA_DIR)/fail26.json \
$(TEST_DATA_DIR)/fail27.json \
$(TEST_DATA_DIR)/fail28.json \
$(TEST_DATA_DIR)/fail29.json \
$(TEST_DATA_DIR)/fail2.json \
$(TEST_DATA_DIR)/fail30.json \
$(TEST_DATA_DIR)/fail31.json \
$(TEST_DATA_DIR)/fail32.json \
$(TEST_DATA_DIR)/fail33.json \
$(TEST_DATA_DIR)/fail34.json \
$(TEST_DATA_DIR)/fail35.json \
$(TEST_DATA_DIR)/fail36.json \
$(TEST_DATA_DIR)/fail37.json \
$(TEST_DATA_DIR)/fail38.json \
$(TEST_DATA_DIR)/fail39.json \
$(TEST_DATA_DIR)/fail40.json \
$(TEST_DATA_DIR)/fail41.json \
$(TEST_DATA_DIR)/fail3.json \
$(TEST_DATA_DIR)/fail4.json \
$(TEST_DATA_DIR)/fail5.json \
$(TEST_DATA_DIR)/fail6.json \
$(TEST_DATA_DIR)/fail7.json \
$(TEST_DATA_DIR)/fail8.json \
$(TEST_DATA_DIR)/fail9.json \
$(TEST_DATA_DIR)/pass1.json \
$(TEST_DATA_DIR)/pass2.json \
$(TEST_DATA_DIR)/pass3.json \
$(TEST_DATA_DIR)/round1.json \
$(TEST_DATA_DIR)/round2.json

EXTRA_DIST=$(TEST_FILES) $(GEN_SRCS)
test_test_json_SOURCES = $(UNIVALUE_TEST_JSON_INT)
test_test_json_LDADD = libunivalue.la
test_test_json_CXXFLAGS = -I$(top_srcdir)/include
test_test_json_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

test_no_nul_SOURCES = $(UNIVALUE_TEST_NO_NUL_INT)
test_no_nul_LDADD = libunivalue.la
test_no_nul_CXXFLAGS = -I$(top_srcdir)/include
test_no_nul_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

test_object_SOURCES = $(UNIVALUE_TEST_OBJECT_INT)
test_object_LDADD = libunivalue.la
test_object_CXXFLAGS = -I$(top_srcdir)/include
test_object_LDFLAGS = -static $(LIBTOOL_APP_LDFLAGS)

TEST_FILES = $(UNIVALUE_TEST_FILES_INT)

EXTRA_DIST=$(UNIVALUE_TEST_FILES_INT) $(GEN_SRCS)
7 changes: 0 additions & 7 deletions README

This file was deleted.

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# UniValue

## Summary

A universal value class, with JSON encoding and decoding.

UniValue is an abstract data type that may be a null, boolean, string,
number, array container, or a key/value dictionary container, nested to
an arbitrary depth.

This class is aligned with the JSON standard, [RFC
7159](https://tools.ietf.org/html/rfc7159.html).

## Library usage

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.
Loading

0 comments on commit d29583a

Please sign in to comment.