Hello community,
here is the log from the commit of package jsoncpp for openSUSE:Factory checked in at 2015-08-01 11:37:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-04-21 10:53:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.jsoncpp.new/jsoncpp.changes 2015-08-01 11:37:22.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jul 28 07:34:49 UTC 2015 - mpluskal@suse.com
+
+- Update to 1.6.5
+ * Other changes are just comments.
+
+-------------------------------------------------------------------
Old:
----
1.6.2.tar.gz
New:
----
1.6.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ jsoncpp.spec ++++++
--- /var/tmp/diff_new_pack.rQZkrS/_old 2015-08-01 11:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.rQZkrS/_new 2015-08-01 11:37:22.000000000 +0200
@@ -18,7 +18,7 @@
%define libname lib%{name}1
Name: jsoncpp
-Version: 1.6.2
+Version: 1.6.5
Release: 0
Summary: C++ library that allows manipulating with JSON
License: MIT
++++++ 1.6.2.tar.gz -> 1.6.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/.travis.yml new/jsoncpp-1.6.5/.travis.yml
--- old/jsoncpp-1.6.2/.travis.yml 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/.travis.yml 2015-07-23 07:26:13.000000000 +0200
@@ -2,16 +2,42 @@
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on:
# http://lint.travis-ci.org/
-before_install: sudo apt-get install cmake
+# See also
+# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11...
+# to allow C++11, though we are not yet building with -std=c++11
+
+install:
+# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
+- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
+# /usr/bin/clang is our version already, and clang-X.Y does not exist.
+#- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
+- echo ${PATH}
+- ls /usr/local
+- ls /usr/local/bin
+- export PATH=/usr/local/bin:/usr/bin:${PATH}
+- echo ${CXX}
+- ${CXX} --version
+- which valgrind
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - gcc-4.9
+ - g++-4.9
+ - clang
+ - valgrind
+os:
+ - linux
language: cpp
compiler:
- gcc
- clang
-script: cmake -DJSONCPP_WITH_CMAKE_PACKAGE=$CMAKE_PKG -DJSONCPP_LIB_BUILD_SHARED=$SHARED_LIB -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE . && make && make jsoncpp_check
+script: ./travis.sh
env:
matrix:
- SHARED_LIB=ON STATIC_LIB=ON CMAKE_PKG=ON BUILD_TYPE=release VERBOSE_MAKE=false
- SHARED_LIB=OFF STATIC_LIB=ON CMAKE_PKG=OFF BUILD_TYPE=debug VERBOSE_MAKE=true VERBOSE
notifications:
- email:
- - aaronjjacobs@gmail.com
+ email: false
+sudo: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/CMakeLists.txt new/jsoncpp-1.6.5/CMakeLists.txt
--- old/jsoncpp-1.6.2/CMakeLists.txt 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/CMakeLists.txt 2015-07-23 07:26:13.000000000 +0200
@@ -9,6 +9,8 @@
OPTION(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF)
OPTION(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF)
+OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
+OPTION(BUILD_STATIC_LIBS "Build jsoncpp_lib static library." ON)
# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
IF(NOT WIN32)
@@ -19,15 +21,16 @@
ENDIF(NOT CMAKE_BUILD_TYPE)
ENDIF(NOT WIN32)
+SET(DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build")
SET(LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory")
SET(RUNTIME_INSTALL_DIR bin
CACHE PATH "Install dir for executables and dlls")
-SET(ARCHIVE_INSTALL_DIR lib${LIB_SUFFIX}
+SET(ARCHIVE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
CACHE PATH "Install dir for static libraries")
-SET(LIBRARY_INSTALL_DIR lib${LIB_SUFFIX}
+SET(LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
CACHE PATH "Install dir for shared libraries")
-SET(INCLUDE_INSTALL_DIR include
+SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include
CACHE PATH "Install dir for headers")
SET(PACKAGE_INSTALL_DIR lib${LIB_SUFFIX}/cmake
CACHE PATH "Install dir for cmake package config files")
@@ -60,7 +63,7 @@
#SET( JSONCPP_VERSION_MAJOR X )
#SET( JSONCPP_VERSION_MINOR Y )
#SET( JSONCPP_VERSION_PATCH Z )
-SET( JSONCPP_VERSION 1.6.2 )
+SET( JSONCPP_VERSION 1.6.5 )
jsoncpp_parse_version( ${JSONCPP_VERSION} JSONCPP_VERSION )
#IF(NOT JSONCPP_VERSION_FOUND)
# MESSAGE(FATAL_ERROR "Failed to parse version string properly. Expect X.Y.Z")
@@ -94,10 +97,11 @@
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# using regular Clang or AppleClang
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wconversion -Wshadow -Wno-sign-conversion")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -pedantic")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wconversion -Wshadow -Wextra -pedantic")
+ # not yet ready for -Wsign-conversion
endif()
IF(JSONCPP_WITH_WARNING_AS_ERROR)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/README.md new/jsoncpp-1.6.5/README.md
--- old/jsoncpp-1.6.2/README.md 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/README.md 2015-07-23 07:26:13.000000000 +0200
@@ -19,12 +19,14 @@
* `0.y.z` can be used with older compilers.
* Major versions maintain binary-compatibility.
-Using JsonCpp in your project
+# Using JsonCpp in your project
-----------------------------
-The recommended approach to integrating JsonCpp in your project is to build
-the amalgamated source (a single `.cpp` file) with your own build system. This
-ensures consistency of compilation flags and ABI compatibility. See the section
-"Generating amalgamated source and header" for instructions.
+The recommended approach to integrating JsonCpp in your project is to include
+the [amalgamated source](#generating-amalgamated-source-and-header) (a single
+`.cpp` file and two `.h` files) in your project, and compile and build as you
+would any other source file. This ensures consistency of compilation flags and
+ABI compatibility, issues which arise when building shared or static
+libraries. See the next section for instructions.
The `include/` should be added to your compiler include path. Jsoncpp headers
should be included as follow:
@@ -34,6 +36,31 @@
If JsonCpp was built as a dynamic library on Windows, then your project needs to
define the macro `JSON_DLL`.
+Generating amalgamated source and header
+----------------------------------------
+JsonCpp is provided with a script to generate a single header and a single
+source file to ease inclusion into an existing project. The amalgamated source
+can be generated at any time by running the following command from the
+top-directory (this requires Python 2.6):
+
+ python amalgamate.py
+
+It is possible to specify header name. See the `-h` option for detail.
+
+By default, the following files are generated:
+* `dist/jsoncpp.cpp`: source file that needs to be added to your project.
+* `dist/json/json.h`: corresponding header file for use in your project. It is
+ equivalent to including `json/json.h` in non-amalgamated source. This header
+ only depends on standard headers.
+* `dist/json/json-forwards.h`: header that provides forward declaration of all
+ JsonCpp types.
+
+The amalgamated sources are generated by concatenating JsonCpp source in the
+correct order and defining the macro `JSON_IS_AMALGAMATION` to prevent inclusion
+of other headers.
+
+# Contributing to JsonCpp
+
Building and testing with CMake
-------------------------------
[CMake][] is a C++ Makefiles/Solution generator. It is usually available on most
@@ -58,7 +85,7 @@
* Make "source code" point to the source directory.
* Make "where to build the binary" point to the directory to use for the build.
* Click on the "Grouped" check box.
-* Review JsonCpp build options (tick `JSONCPP_LIB_BUILD_SHARED` to build as a
+* Review JsonCpp build options (tick `BUILD_SHARED_LIBS` to build as a
dynamic library).
* Click the configure button at the bottom, then the generate button.
* The generated solution/makefiles can be found in the binary directory.
@@ -67,10 +94,10 @@
mkdir -p build/debug
cd build/debug
- cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_STATIC=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -G "Unix Makefiles" ../..
+ cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF -DARCHIVE_INSTALL_DIR=. -G "Unix Makefiles" ../..
make
-Running `cmake -`" will display the list of available generators (passed using
+Running `cmake -h` will display the list of available generators (passed using
the `-G` option).
By default CMake hides compilation commands. This can be modified by specifying
@@ -106,7 +133,7 @@
environment by running `vcvars32.bat` (e.g. MSVC 2008 command prompt) before
running SCons.
-# Running the tests manually
+## Running the tests manually
You need to run tests manually only if you are troubleshooting an issue.
In the instructions below, replace `path/to/jsontest` with the path of the
@@ -142,29 +169,6 @@
See `doxybuild.py --help` for options.
-Generating amalgamated source and header
-----------------------------------------
-JsonCpp is provided with a script to generate a single header and a single
-source file to ease inclusion into an existing project. The amalgamated source
-can be generated at any time by running the following command from the
-top-directory (this requires Python 2.6):
-
- python amalgamate.py
-
-It is possible to specify header name. See the `-h` option for detail.
-
-By default, the following files are generated:
-* `dist/jsoncpp.cpp`: source file that needs to be added to your project.
-* `dist/json/json.h`: corresponding header file for use in your project. It is
- equivalent to including `json/json.h` in non-amalgamated source. This header
- only depends on standard headers.
-* `dist/json/json-forwards.h`: header that provides forward declaration of all
- JsonCpp types.
-
-The amalgamated sources are generated by concatenating JsonCpp source in the
-correct order and defining the macro `JSON_IS_AMALGAMATION` to prevent inclusion
-of other headers.
-
Adding a reader/writer test
---------------------------
To add a test, you need to create two files in test/data:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/appveyor.yml new/jsoncpp-1.6.5/appveyor.yml
--- old/jsoncpp-1.6.2/appveyor.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/jsoncpp-1.6.5/appveyor.yml 2015-07-23 07:26:13.000000000 +0200
@@ -0,0 +1,35 @@
+# This is a comment.
+
+version: build.{build}
+
+os: Windows Server 2012 R2
+
+clone_folder: c:\projects\jsoncpp
+
+platform:
+ - Win32
+ - x64
+
+configuration:
+ - Debug
+ - Release
+
+# scripts to run before build
+before_build:
+ - echo "Running cmake..."
+ - cd c:\projects\jsoncpp
+ - cmake --version
+ - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
+ - if %PLATFORM% == Win32 cmake .
+ - if %PLATFORM% == x64 cmake -G "Visual Studio 12 2013 Win64" .
+
+build:
+ project: jsoncpp.sln # path to Visual Studio solution or project
+
+deploy:
+ provider: GitHub
+ auth_token:
+ secure: K2Tp1q8pIZ7rs0Ot24ZMWuwr12Ev6Tc6QkhMjGQxoQG3ng1pXtgPasiJ45IDXGdg
+ on:
+ branch: master
+ appveyor_repo_tag: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/dev.makefile new/jsoncpp-1.6.5/dev.makefile
--- old/jsoncpp-1.6.2/dev.makefile 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/dev.makefile 2015-07-23 07:26:13.000000000 +0200
@@ -16,7 +16,7 @@
# Then 'git add -A' and 'git push' in jsoncpp-docs.
build:
mkdir -p build/debug
- cd build/debug; cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_SHARED=ON -G "Unix Makefiles" ../..
+ cd build/debug; cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../..
make -C build/debug
# Currently, this depends on include/json/version.h generated
@@ -26,6 +26,9 @@
python3.4 amalgamate.py
cd dist; gcc -I. -c jsoncpp.cpp
+valgrind:
+ valgrind --error-exitcode=42 --leak-check=full ./build/debug/src/test_lib_json/jsoncpp_test
+
clean:
\rm -rf *.gz *.asc dist/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/devtools/agent_vmw7.json new/jsoncpp-1.6.5/devtools/agent_vmw7.json
--- old/jsoncpp-1.6.2/devtools/agent_vmw7.json 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/devtools/agent_vmw7.json 2015-07-23 07:26:13.000000000 +0200
@@ -19,8 +19,8 @@
},
{"name": "shared_dll",
"variables": [
- ["JSONCPP_LIB_BUILD_SHARED=true"],
- ["JSONCPP_LIB_BUILD_SHARED=false"]
+ ["BUILD_SHARED_LIBS=true"],
+ ["BUILD_SHARED_LIBS=false"]
]
},
{"name": "build_type",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/devtools/agent_vmxp.json new/jsoncpp-1.6.5/devtools/agent_vmxp.json
--- old/jsoncpp-1.6.2/devtools/agent_vmxp.json 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/devtools/agent_vmxp.json 2015-07-23 07:26:13.000000000 +0200
@@ -12,8 +12,8 @@
},
{"name": "shared_dll",
"variables": [
- ["JSONCPP_LIB_BUILD_SHARED=true"],
- ["JSONCPP_LIB_BUILD_SHARED=false"]
+ ["BUILD_SHARED_LIBS=true"],
+ ["BUILD_SHARED_LIBS=false"]
]
},
{"name": "build_type",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/devtools/fixeol.py new/jsoncpp-1.6.5/devtools/fixeol.py
--- old/jsoncpp-1.6.2/devtools/fixeol.py 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/devtools/fixeol.py 2015-07-23 07:26:13.000000000 +0200
@@ -5,6 +5,7 @@
from __future__ import print_function
import os.path
+import sys
def fix_source_eol(path, is_dry_run = True, verbose = True, eol = '\n'):
"""Makes sure that all sources have the specified eol sequence (default: unix)."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/doxybuild.py new/jsoncpp-1.6.5/doxybuild.py
--- old/jsoncpp-1.6.2/doxybuild.py 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/doxybuild.py 2015-07-23 07:26:13.000000000 +0200
@@ -72,7 +72,7 @@
if silent:
status, output = getstatusoutput(cmd)
else:
- status, output = os.system(' '.join(cmd)), ''
+ status, output = subprocess.call(cmd), ''
if status:
msg = 'Error while %s ...\n\terror=%d, output="""%s"""' %(info, status, output)
raise Exception(msg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/include/json/reader.h new/jsoncpp-1.6.5/include/json/reader.h
--- old/jsoncpp-1.6.2/include/json/reader.h 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/include/json/reader.h 2015-07-23 07:26:13.000000000 +0200
@@ -346,13 +346,13 @@
/** Called by ctor, but you can use this to reset settings_.
* \pre 'settings' != NULL (but Json::null is fine)
* \remark Defaults:
- * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
*/
static void setDefaults(Json::Value* settings);
/** Same as old Features::strictMode().
* \pre 'settings' != NULL (but Json::null is fine)
* \remark Defaults:
- * \snippet src/lib_json/json_reader.cpp CharReaderBuilderDefaults
+ * \snippet src/lib_json/json_reader.cpp CharReaderBuilderStrictMode
*/
static void strictMode(Json::Value* settings);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/include/json/value.h new/jsoncpp-1.6.5/include/json/value.h
--- old/jsoncpp-1.6.2/include/json/value.h 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/include/json/value.h 2015-07-23 07:26:13.000000000 +0200
@@ -37,21 +37,36 @@
*
* We use nothing but these internally. Of course, STL can throw others.
*/
-class JSON_API Exception;
+class JSON_API Exception : public std::exception {
+public:
+ Exception(std::string const& msg);
+ virtual ~Exception() throw();
+ virtual char const* what() const throw();
+protected:
+ std::string const msg_;
+};
+
/** Exceptions which the user cannot easily avoid.
*
* E.g. out-of-memory (when we use malloc), stack-overflow, malicious input
*
* \remark derived from Json::Exception
*/
-class JSON_API RuntimeError;
+class JSON_API RuntimeError : public Exception {
+public:
+ RuntimeError(std::string const& msg);
+};
+
/** Exceptions thrown by JSON_ASSERT/JSON_FAIL macros.
*
* These are precondition-violations (user bugs) and internal errors (our bugs).
*
* \remark derived from Json::Exception
*/
-class JSON_API LogicError;
+class JSON_API LogicError : public Exception {
+public:
+ LogicError(std::string const& msg);
+};
/// used internally
void throwRuntimeError(std::string const& msg);
@@ -211,7 +226,7 @@
void swap(CZString& other);
struct StringStorage {
- DuplicationPolicy policy_: 2;
+ unsigned policy_: 2;
unsigned length_: 30; // 1GB max
};
@@ -255,7 +270,7 @@
#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* begin, const char* end); ///< Copy all, incl zeroes.
/** \brief Constructs a value from a static string.
* Like other value string constructor but do not duplicate the string for
@@ -306,7 +321,7 @@
* \return false if !string. (Seg-fault if str or end are NULL.)
*/
bool getString(
- char const** str, char const** end) const;
+ char const** begin, char const** end) const;
#ifdef JSON_USE_CPPTL
CppTL::ConstString asConstString() const;
#endif
@@ -435,8 +450,8 @@
Value get(const char* key, const Value& defaultValue) const;
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
- /// \param key may contain embedded nulls.
- Value get(const char* key, const char* end, const Value& defaultValue) const;
+ /// \note key may contain embedded nulls.
+ Value get(const char* begin, const char* end, const Value& defaultValue) const;
/// Return the member named key if it exist, defaultValue otherwise.
/// \note deep copy
/// \param key may contain embedded nulls.
@@ -448,12 +463,12 @@
#endif
/// Most general and efficient version of isMember()const, get()const,
/// and operator[]const
- /// \note As stated elsewhere, behavior is undefined if (end-key) >= 2^30
- Value const* find(char const* key, char const* end) const;
+ /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30
+ Value const* find(char const* begin, char const* end) const;
/// Most general and efficient version of object-mutators.
- /// \note As stated elsewhere, behavior is undefined if (end-key) >= 2^30
+ /// \note As stated elsewhere, behavior is undefined if (end-begin) >= 2^30
/// \return non-zero, but JSON_ASSERT if this is neither object nor nullValue.
- Value const* demand(char const* key, char const* end);
+ Value const* demand(char const* begin, char const* end);
/// \brief Remove and return the named member.
///
/// Do nothing if it did not exist.
@@ -466,7 +481,7 @@
/// \param key may contain embedded nulls.
/// \deprecated
Value removeMember(const std::string& key);
- /// Same as removeMember(const char* key, const char* end, Value* removed),
+ /// Same as removeMember(const char* begin, const char* end, Value* removed),
/// but 'key' is null-terminated.
bool removeMember(const char* key, Value* removed);
/** \brief Remove the named map member.
@@ -477,7 +492,7 @@
*/
bool removeMember(std::string const& key, Value* removed);
/// Same as removeMember(std::string const& key, Value* removed)
- bool removeMember(const char* key, const char* end, Value* removed);
+ bool removeMember(const char* begin, const char* end, Value* removed);
/** \brief Remove the indexed array element.
O(n) expensive operations.
@@ -493,7 +508,7 @@
/// \param key may contain embedded nulls.
bool isMember(const std::string& key) const;
/// Same as isMember(std::string const& key)const
- bool isMember(const char* key, const char* end) const;
+ bool isMember(const char* begin, const char* end) const;
#ifdef JSON_USE_CPPTL
/// Return true if the object has a member named key.
bool isMember(const CppTL::ConstString& key) const;
@@ -512,6 +527,7 @@
//# endif
/// \deprecated Always pass len.
+ JSONCPP_DEPRECATED("Use setComment(std::string const&) instead.")
void setComment(const char* comment, CommentPlacement placement);
/// Comments must be //... or /* ... */
void setComment(const char* comment, size_t len, CommentPlacement placement);
@@ -652,9 +668,6 @@
typedef int difference_type;
typedef ValueIteratorBase SelfType;
- ValueIteratorBase();
- explicit ValueIteratorBase(const Value::ObjectValues::iterator& current);
-
bool operator==(const SelfType& other) const { return isEqual(other); }
bool operator!=(const SelfType& other) const { return !isEqual(other); }
@@ -702,6 +715,12 @@
Value::ObjectValues::iterator current_;
// Indicates that iterator is for a null value.
bool isNull_;
+
+public:
+ // For some reason, BORLAND needs these at the end, rather
+ // than earlier. No idea why.
+ ValueIteratorBase();
+ explicit ValueIteratorBase(const Value::ObjectValues::iterator& current);
};
/** \brief const iterator for object and array value.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/include/json/version.h new/jsoncpp-1.6.5/include/json/version.h
--- old/jsoncpp-1.6.2/include/json/version.h 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/include/json/version.h 2015-07-23 07:26:13.000000000 +0200
@@ -1,13 +1,12 @@
-// DO NOT EDIT. This file is generated by CMake from "version"
-// and "version.h.in" files.
+// DO NOT EDIT. This file (and "version") is generated by CMake.
// Run CMake configure step to update it.
#ifndef JSON_VERSION_H_INCLUDED
# define JSON_VERSION_H_INCLUDED
-# define JSONCPP_VERSION_STRING "1.6.2"
+# define JSONCPP_VERSION_STRING "1.6.5"
# define JSONCPP_VERSION_MAJOR 1
# define JSONCPP_VERSION_MINOR 6
-# define JSONCPP_VERSION_PATCH 2
+# define JSONCPP_VERSION_PATCH 5
# 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.6.2/pkg-config/jsoncpp.pc.in new/jsoncpp-1.6.5/pkg-config/jsoncpp.pc.in
--- old/jsoncpp-1.6.2/pkg-config/jsoncpp.pc.in 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/pkg-config/jsoncpp.pc.in 2015-07-23 07:26:13.000000000 +0200
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${exec_prefix}/@LIBRARY_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+libdir=@LIBRARY_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
Name: jsoncpp
Description: A C++ library for interacting with JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/src/jsontestrunner/CMakeLists.txt new/jsoncpp-1.6.5/src/jsontestrunner/CMakeLists.txt
--- old/jsoncpp-1.6.2/src/jsontestrunner/CMakeLists.txt 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/src/jsontestrunner/CMakeLists.txt 2015-07-23 07:26:13.000000000 +0200
@@ -1,18 +1,15 @@
FIND_PACKAGE(PythonInterp 2.6)
-IF(JSONCPP_LIB_BUILD_SHARED)
- ADD_DEFINITIONS( -DJSON_DLL )
-ENDIF(JSONCPP_LIB_BUILD_SHARED)
-
ADD_EXECUTABLE(jsontestrunner_exe
main.cpp
)
-IF(JSONCPP_LIB_BUILD_SHARED)
+IF(BUILD_SHARED_LIBS)
+ ADD_DEFINITIONS( -DJSON_DLL )
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib)
-ELSE(JSONCPP_LIB_BUILD_SHARED)
+ELSE(BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib_static)
-ENDIF(JSONCPP_LIB_BUILD_SHARED)
+ENDIF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(jsontestrunner_exe PROPERTIES OUTPUT_NAME jsontestrunner_exe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/src/lib_json/CMakeLists.txt new/jsoncpp-1.6.5/src/lib_json/CMakeLists.txt
--- old/jsoncpp-1.6.2/src/lib_json/CMakeLists.txt 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/src/lib_json/CMakeLists.txt 2015-07-23 07:26:13.000000000 +0200
@@ -1,15 +1,8 @@
-OPTION(JSONCPP_LIB_BUILD_SHARED "Build jsoncpp_lib as a shared library." OFF)
-OPTION(JSONCPP_LIB_BUILD_STATIC "Build jsoncpp_lib static library." ON)
-
-IF(BUILD_SHARED_LIBS)
- SET(JSONCPP_LIB_BUILD_SHARED ON)
-ENDIF(BUILD_SHARED_LIBS)
-
if( CMAKE_COMPILER_IS_GNUCXX )
#Get compiler version.
execute_process( COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GNUCXX_VERSION )
-
+
#-Werror=* was introduced -after- GCC 4.1.2
if( GNUCXX_VERSION VERSION_GREATER 4.1.2 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing")
@@ -46,11 +39,12 @@
SET(INSTALL_EXPORT)
ENDIF(JSONCPP_WITH_CMAKE_PACKAGE)
-IF(JSONCPP_LIB_BUILD_SHARED)
+IF(BUILD_SHARED_LIBS)
ADD_DEFINITIONS( -DJSON_DLL_BUILD )
ADD_LIBRARY(jsoncpp_lib SHARED ${PUBLIC_HEADERS} ${jsoncpp_sources})
SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_VERSION_MAJOR})
- SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp )
+ SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp
+ DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
INSTALL( TARGETS jsoncpp_lib ${INSTALL_EXPORT}
RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
@@ -65,10 +59,11 @@
ENDIF()
-IF(JSONCPP_LIB_BUILD_STATIC)
+IF(BUILD_STATIC_LIBS)
ADD_LIBRARY(jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources})
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_VERSION_MAJOR})
- SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp )
+ SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
+ DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
INSTALL( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/src/lib_json/json_reader.cpp new/jsoncpp-1.6.5/src/lib_json/json_reader.cpp
--- old/jsoncpp-1.6.2/src/lib_json/json_reader.cpp 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/src/lib_json/json_reader.cpp 2015-07-23 07:26:13.000000000 +0200
@@ -597,33 +597,9 @@
bool Reader::decodeDouble(Token& token, Value& decoded) {
double value = 0;
- const int bufferSize = 32;
- int count;
- int length = int(token.end_ - token.start_);
-
- // Sanity check to avoid buffer overflow exploits.
- if (length < 0) {
- return addError("Unable to parse token length", token);
- }
-
- // Avoid using a string constant for the format control string given to
- // sscanf, as this can cause hard to debug crashes on OS X. See here for more
- // info:
- //
- // http://developer.apple.com/library/mac/#DOCUMENTATION/DeveloperTools/gcc-4.0...
- char format[] = "%lf";
-
- if (length <= bufferSize) {
- Char buffer[bufferSize + 1];
- memcpy(buffer, token.start_, length);
- buffer[length] = 0;
- count = sscanf(buffer, format, &value);
- } else {
- std::string buffer(token.start_, token.end_);
- count = sscanf(buffer.c_str(), format, &value);
- }
-
- if (count != 1)
+ std::string buffer(token.start_, token.end_);
+ std::istringstream is(buffer);
+ if (!(is >> value))
return addError("'" + std::string(token.start_, token.end_) +
"' is not a number.",
token);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/src/lib_json/json_tool.h new/jsoncpp-1.6.5/src/lib_json/json_tool.h
--- old/jsoncpp-1.6.2/src/lib_json/json_tool.h 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/src/lib_json/json_tool.h 2015-07-23 07:26:13.000000000 +0200
@@ -30,8 +30,8 @@
} else if (cp <= 0xFFFF) {
result.resize(3);
result[2] = static_cast<char>(0x80 | (0x3f & cp));
- result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
- result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
+ result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
+ result[0] = static_cast<char>(0xE0 | (0xf & (cp >> 12)));
} else if (cp <= 0x10FFFF) {
result.resize(4);
result[3] = static_cast<char>(0x80 | (0x3f & cp));
@@ -43,7 +43,7 @@
return result;
}
-/// Returns true if ch is a control character (in range [0,32[).
+/// Returns true if ch is a control character (in range [1,31]).
static inline bool isControlCharacter(char ch) { return ch > 0 && ch <= 0x1F; }
enum {
@@ -63,7 +63,7 @@
static inline void uintToString(LargestUInt value, char*& current) {
*--current = 0;
do {
- *--current = char(value % 10) + '0';
+ *--current = static_cast<signed char>(value % 10U + static_cast<unsigned>('0'));
value /= 10;
} while (value != 0);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsoncpp-1.6.2/src/lib_json/json_value.cpp new/jsoncpp-1.6.5/src/lib_json/json_value.cpp
--- old/jsoncpp-1.6.2/src/lib_json/json_value.cpp 2015-04-11 21:45:33.000000000 +0200
+++ new/jsoncpp-1.6.5/src/lib_json/json_value.cpp 2015-07-23 07:26:13.000000000 +0200
@@ -108,7 +108,7 @@
JSON_ASSERT_MESSAGE(length <= (unsigned)Value::maxInt - sizeof(unsigned) - 1U,
"in Json::Value::duplicateAndPrefixStringValue(): "
"length too big for prefixing");
- unsigned actualLength = length + sizeof(unsigned) + 1U;
+ unsigned actualLength = length + static_cast<unsigned>(sizeof(unsigned)) + 1U;
char* newString = static_cast