Hello community, here is the log from the commit of package jsoncpp for openSUSE:Factory checked in at 2015-03-09 10:09:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jsoncpp (Old) and /work/SRC/openSUSE:Factory/.jsoncpp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "jsoncpp" Changes: -------- --- /work/SRC/openSUSE:Factory/jsoncpp/jsoncpp.changes 2015-03-05 18:16:51.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.jsoncpp.new/jsoncpp.changes 2015-03-09 10:09:57.000000000 +0100 @@ -1,0 +2,18 @@ +Fri Mar 6 18:24:11 UTC 2015 - mpluskal@suse.com + +- Add missing dependency on graphviz + +------------------------------------------------------------------- +Fri Mar 6 18:16:35 UTC 2015 - mpluskal@suse.com + +- Correct rpm group +- Update to 1.5.2 + * Fixed compile error for VS2013. + * Added operator[] to Builders. (Builders are not yet widely + used, and 0.9.z is very new, so we have not bumped the minor + version number.) +- Changes for 1.5.1 + * Plus a minor bug-fix. (For the Builders, ::validate() was + always returning true.) + +------------------------------------------------------------------- Old: ---- 1.5.0.tar.gz New: ---- 1.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jsoncpp.spec ++++++ --- /var/tmp/diff_new_pack.Ur4sBj/_old 2015-03-09 10:09:58.000000000 +0100 +++ /var/tmp/diff_new_pack.Ur4sBj/_new 2015-03-09 10:09:58.000000000 +0100 @@ -17,17 +17,18 @@ Name: jsoncpp -Version: 1.5.0 +Version: 1.5.2 Release: 0 Summary: C++ library that allows manipulating with JSON License: MIT -Group: Devel/Libraries/C and C++ +Group: Development/Libraries/C and C++ Url: https://github.com/open-source-parsers/jsoncpp Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz BuildRequires: cmake BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ +BuildRequires: graphviz BuildRequires: pkg-config BuildRequires: python BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ 1.5.0.tar.gz -> 1.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/amalgamate.py new/jsoncpp-1.5.2/amalgamate.py --- old/jsoncpp-1.5.0/amalgamate.py 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/amalgamate.py 2015-03-05 16:18:44.000000000 +0100 @@ -1,6 +1,6 @@ """Amalgate json-cpp library sources into a single source and header file. -Requires Python 2.6 +Works with python2.6+ and python3.4+. Example of invocation (must be invoked from json-cpp top directory): python amalgate.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/doc/jsoncpp.dox new/jsoncpp-1.5.2/doc/jsoncpp.dox --- old/jsoncpp-1.5.0/doc/jsoncpp.dox 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/doc/jsoncpp.dox 2015-03-05 16:18:44.000000000 +0100 @@ -96,13 +96,13 @@ \code // For convenience, use `writeString()` with a specialized builder. Json::StreamWriterBuilder wbuilder; -wbuilder.settings_["indentation"] = "\t"; // simple Json::Value +wbuilder["indentation"] = "\t"; std::string document = Json::writeString(wbuilder, root); // Here, using a specialized Builder, we discard comments and // record errors as we parse. Json::CharReaderBuilder rbuilder; -rbuilder.settings_["collectComments"] = false; // simple Json::Value +rbuilder["collectComments"] = false; std::string errs; bool ok = Json::parseFromStream(rbuilder, std::cin, &root, &errs); \endcode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/include/json/reader.h new/jsoncpp-1.5.2/include/json/reader.h --- old/jsoncpp-1.5.0/include/json/reader.h 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/include/json/reader.h 2015-03-05 16:18:44.000000000 +0100 @@ -285,7 +285,7 @@ \code using namespace Json; CharReaderBuilder builder; - builder.settings_["collectComments"] = false; + builder["collectComments"] = false; Value value; std::string errs; bool ok = parseFromStream(builder, std::cin, &value, &errs); @@ -337,6 +337,11 @@ * otherwise, indicate bad settings via 'invalid'. */ bool validate(Json::Value* invalid) const; + + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + /** Called by ctor, but you can use this to reset settings_. * \pre 'settings' != NULL (but Json::null is fine) * \remark Defaults: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/include/json/value.h new/jsoncpp-1.5.2/include/json/value.h --- old/jsoncpp-1.5.0/include/json/value.h 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/include/json/value.h 2015-03-05 16:18:44.000000000 +0100 @@ -134,8 +134,8 @@ typedef Json::LargestUInt LargestUInt; typedef Json::ArrayIndex ArrayIndex; - static const Value& null; ///! We regret this reference to a global instance; prefer the simpler Value(). - static const Value& nullRef; ///! just a kludge for binary-compatibility; same as null + static const Value& null; ///< We regret this reference to a global instance; prefer the simpler Value(). + static const Value& nullRef; ///< just a kludge for binary-compatibility; same as null /// Minimum signed integer value that can be stored in a Json::Value. static const LargestInt minLargestInt; /// Maximum signed integer value that can be stored in a Json::Value. @@ -228,8 +228,8 @@ Value(UInt64 value); #endif // if defined(JSON_HAS_INT64) Value(double value); - Value(const char* value); ///! Copy til first 0. (NULL causes to seg-fault.) - Value(const char* beginValue, const char* endValue); ///! Copy all, incl zeroes. + Value(const char* value); ///< Copy til first 0. (NULL causes to seg-fault.) + Value(const char* beginValue, const char* endValue); ///< Copy all, incl zeroes. /** \brief Constructs a value from a static string. * Like other value string constructor but do not duplicate the string for @@ -246,7 +246,7 @@ * \endcode */ Value(const StaticString& value); - Value(const std::string& value); ///! Copy data() til size(). Embedded zeroes too. + Value(const std::string& value); ///< Copy data() til size(). Embedded zeroes too. #ifdef JSON_USE_CPPTL Value(const CppTL::ConstString& value); #endif @@ -273,8 +273,8 @@ bool operator!=(const Value& other) const; int compare(const Value& other) const; - const char* asCString() const; ///! Embedded zeroes could cause you trouble! - std::string asString() const; ///! Embedded zeroes are possible. + const char* asCString() const; ///< Embedded zeroes could cause you trouble! + std::string asString() const; ///< Embedded zeroes are possible. /** Get raw char* of string-value. * \return false if !string. (Seg-fault if str or end are NULL.) */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/include/json/version.h new/jsoncpp-1.5.2/include/json/version.h --- old/jsoncpp-1.5.0/include/json/version.h 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/include/json/version.h 2015-03-05 16:18:44.000000000 +0100 @@ -4,10 +4,10 @@ #ifndef JSON_VERSION_H_INCLUDED # define JSON_VERSION_H_INCLUDED -# define JSONCPP_VERSION_STRING "1.5.0" +# define JSONCPP_VERSION_STRING "1.5.2" # define JSONCPP_VERSION_MAJOR 1 # define JSONCPP_VERSION_MINOR 5 -# define JSONCPP_VERSION_PATCH 0 +# define JSONCPP_VERSION_PATCH 2 # define JSONCPP_VERSION_QUALIFIER # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/include/json/writer.h new/jsoncpp-1.5.2/include/json/writer.h --- old/jsoncpp-1.5.0/include/json/writer.h 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/include/json/writer.h 2015-03-05 16:18:44.000000000 +0100 @@ -76,8 +76,8 @@ using namespace Json; Value value = ...; StreamWriterBuilder builder; - builder.settings_["commentStyle"] = "None"; - builder.settings_["indentation"] = " "; // or whatever you like + builder["commentStyle"] = "None"; + builder["indentation"] = " "; // or whatever you like std::unique_ptrJson::StreamWriter writer( builder.newStreamWriter()); writer->write(value, &std::cout); @@ -119,6 +119,10 @@ * otherwise, indicate bad settings via 'invalid'. */ bool validate(Json::Value* invalid) const; + /** A simple way to update a specific setting. + */ + Value& operator[](std::string key); + /** Called by ctor, but you can use this to reset settings_. * \pre 'settings' != NULL (but Json::null is fine) * \remark Defaults: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/src/lib_json/json_reader.cpp new/jsoncpp-1.5.2/src/lib_json/json_reader.cpp --- old/jsoncpp-1.5.0/src/lib_json/json_reader.cpp 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/src/lib_json/json_reader.cpp 2015-03-05 16:18:44.000000000 +0100 @@ -1915,7 +1915,6 @@ Json::Value my_invalid; if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL Json::Value& inv = *invalid; - bool valid = true; std::setstd::string valid_keys; getValidReaderKeys(&valid_keys); Value::Members keys = settings_.getMemberNames(); @@ -1926,7 +1925,11 @@ inv[key] = settings_[key]; } } - return valid; + return 0u == inv.size(); +} +Value& CharReaderBuilder::operator[](std::string key) +{ + return settings_[key]; } // static void CharReaderBuilder::strictMode(Json::Value* settings) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/src/lib_json/json_value.cpp new/jsoncpp-1.5.2/src/lib_json/json_value.cpp --- old/jsoncpp-1.5.0/src/lib_json/json_value.cpp 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/src/lib_json/json_value.cpp 2015-03-05 16:18:44.000000000 +0100 @@ -17,6 +17,7 @@ #include <cpptl/conststring.h> #endif #include <cstddef> // size_t +#include <algorithm> // min() #define JSON_ASSERT_UNREACHABLE assert(false) @@ -325,19 +326,19 @@ Value::Value(const char* value) { initBasic(stringValue, true); - value_.string_ = duplicateAndPrefixStringValue(value, strlen(value)); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast<unsigned>(strlen(value))); } Value::Value(const char* beginValue, const char* endValue) { initBasic(stringValue, true); value_.string_ = - duplicateAndPrefixStringValue(beginValue, (unsigned int)(endValue - beginValue)); + duplicateAndPrefixStringValue(beginValue, static_cast<unsigned>(endValue - beginValue)); } Value::Value(const std::string& value) { initBasic(stringValue, true); value_.string_ = - duplicateAndPrefixStringValue(value.data(), (unsigned int)value.length()); + duplicateAndPrefixStringValue(value.data(), static_cast<unsigned>(value.length())); } Value::Value(const StaticString& value) { @@ -348,7 +349,7 @@ #ifdef JSON_USE_CPPTL Value::Value(const CppTL::ConstString& value) { initBasic(stringValue, true); - value_.string_ = duplicateAndPrefixStringValue(value, value.length()); + value_.string_ = duplicateAndPrefixStringValue(value, static_cast<unsigned>(value.length())); } #endif @@ -937,7 +938,7 @@ if (type_ == nullValue) *this = Value(objectValue); CZString actualKey( - key, strlen(key), CZString::noDuplication); // NOTE! + key, static_cast<unsigned>(strlen(key)), CZString::noDuplication); // NOTE! ObjectValues::iterator it = value_.map_->lower_bound(actualKey); if (it != value_.map_->end() && (*it).first == actualKey) return (*it).second; @@ -957,7 +958,7 @@ if (type_ == nullValue) *this = Value(objectValue); CZString actualKey( - key, (end-key), CZString::duplicateOnCopy); + key, static_cast<unsigned>(end-key), CZString::duplicateOnCopy); ObjectValues::iterator it = value_.map_->lower_bound(actualKey); if (it != value_.map_->end() && (*it).first == actualKey) return (*it).second; @@ -981,7 +982,7 @@ type_ == nullValue || type_ == objectValue, "in Json::Value::find(key, end, found): requires objectValue or nullValue"); if (type_ == nullValue) return NULL; - CZString actualKey(key, end-key, CZString::noDuplication); + CZString actualKey(key, static_cast<unsigned>(end-key), CZString::noDuplication); ObjectValues::const_iterator it = value_.map_->find(actualKey); if (it == value_.map_->end()) return NULL; return &(*it).second; @@ -1045,7 +1046,7 @@ if (type_ != objectValue) { return false; } - CZString actualKey(key, end-key, CZString::noDuplication); + CZString actualKey(key, static_cast<unsigned>(end-key), CZString::noDuplication); ObjectValues::iterator it = value_.map_->find(actualKey); if (it == value_.map_->end()) return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/src/lib_json/json_writer.cpp new/jsoncpp-1.5.2/src/lib_json/json_writer.cpp --- old/jsoncpp-1.5.0/src/lib_json/json_writer.cpp 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/src/lib_json/json_writer.cpp 2015-03-05 16:18:44.000000000 +0100 @@ -1110,7 +1110,6 @@ Json::Value my_invalid; if (!invalid) invalid = &my_invalid; // so we do not need to test for NULL Json::Value& inv = *invalid; - bool valid = true; std::setstd::string valid_keys; getValidWriterKeys(&valid_keys); Value::Members keys = settings_.getMemberNames(); @@ -1121,7 +1120,11 @@ inv[key] = settings_[key]; } } - return valid; + return 0u == inv.size(); +} +Value& StreamWriterBuilder::operator[](std::string key) +{ + return settings_[key]; } // static void StreamWriterBuilder::setDefaults(Json::Value* settings) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/src/test_lib_json/main.cpp new/jsoncpp-1.5.2/src/test_lib_json/main.cpp --- old/jsoncpp-1.5.0/src/test_lib_json/main.cpp 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/src/test_lib_json/main.cpp 2015-03-05 16:18:44.000000000 +0100 @@ -2174,6 +2174,29 @@ } } +struct BuilderTest : JsonTest::TestCase {}; + +JSONTEST_FIXTURE(BuilderTest, settings) { + { + Json::Value errs; + Json::CharReaderBuilder rb; + JSONTEST_ASSERT_EQUAL(false, rb.settings_.isMember("foo")); + JSONTEST_ASSERT_EQUAL(true, rb.validate(&errs)); + rb["foo"] = "bar"; + JSONTEST_ASSERT_EQUAL(true, rb.settings_.isMember("foo")); + JSONTEST_ASSERT_EQUAL(false, rb.validate(&errs)); + } + { + Json::Value errs; + Json::StreamWriterBuilder wb; + JSONTEST_ASSERT_EQUAL(false, wb.settings_.isMember("foo")); + JSONTEST_ASSERT_EQUAL(true, wb.validate(&errs)); + wb["foo"] = "bar"; + JSONTEST_ASSERT_EQUAL(true, wb.settings_.isMember("foo")); + JSONTEST_ASSERT_EQUAL(false, wb.validate(&errs)); + } +} + struct IteratorTest : JsonTest::TestCase {}; JSONTEST_FIXTURE(IteratorTest, distance) { @@ -2247,6 +2270,8 @@ JSONTEST_REGISTER_FIXTURE(runner, CharReaderAllowZeroesTest, issue176); + JSONTEST_REGISTER_FIXTURE(runner, BuilderTest, settings); + JSONTEST_REGISTER_FIXTURE(runner, IteratorTest, distance); return runner.runCommandLine(argc, argv); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.5.0/version new/jsoncpp-1.5.2/version --- old/jsoncpp-1.5.0/version 2015-03-03 17:15:09.000000000 +0100 +++ new/jsoncpp-1.5.2/version 2015-03-05 16:18:44.000000000 +0100 @@ -1 +1 @@ -1.5.0 +1.5.2 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org