mirror of
				https://github.com/Tencent/rapidjson.git
				synced 2025-11-04 04:10:01 +01:00 
			
		
		
		
	Merge pull request #311 from miloyip/issue310_versionmacro
RapidJSON v1.0.0
This commit is contained in:
		@@ -3,8 +3,8 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
PROJECT(RapidJSON CXX)
 | 
					PROJECT(RapidJSON CXX)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(LIB_MAJOR_VERSION "0")
 | 
					set(LIB_MAJOR_VERSION "1")
 | 
				
			||||||
set(LIB_MINOR_VERSION "12")
 | 
					set(LIB_MINOR_VERSION "0")
 | 
				
			||||||
set(LIB_PATCH_VERSION "0")
 | 
					set(LIB_PATCH_VERSION "0")
 | 
				
			||||||
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
 | 
					set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
version: 0.12.{build}
 | 
					version: 1.0.0.{build}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
configuration:
 | 
					configuration:
 | 
				
			||||||
- Debug
 | 
					- Debug
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,40 @@
 | 
				
			|||||||
#include <cstdlib>  // malloc(), realloc(), free(), size_t
 | 
					#include <cstdlib>  // malloc(), realloc(), free(), size_t
 | 
				
			||||||
#include <cstring>  // memset(), memcpy(), memmove(), memcmp()
 | 
					#include <cstring>  // memset(), memcpy(), memmove(), memcmp()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					// RAPIDJSON_VERSION_STRING
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// ALWAYS synchronize the following 3 macros with corresponding variables in /CMakeLists.txt.
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
 | 
				
			||||||
 | 
					// token stringification
 | 
				
			||||||
 | 
					#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)
 | 
				
			||||||
 | 
					#define RAPIDJSON_DO_STRINGIFY(x) #x
 | 
				
			||||||
 | 
					//!@endcond
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*! \def RAPIDJSON_MAJOR_VERSION
 | 
				
			||||||
 | 
					    \ingroup RAPIDJSON_CONFIG
 | 
				
			||||||
 | 
					    \brief Major version of RapidJSON in integer.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					/*! \def RAPIDJSON_MINOR_VERSION
 | 
				
			||||||
 | 
					    \ingroup RAPIDJSON_CONFIG
 | 
				
			||||||
 | 
					    \brief Minor version of RapidJSON in integer.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					/*! \def RAPIDJSON_PATCH_VERSION
 | 
				
			||||||
 | 
					    \ingroup RAPIDJSON_CONFIG
 | 
				
			||||||
 | 
					    \brief Patch version of RapidJSON in integer.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					/*! \def RAPIDJSON_VERSION_STRING
 | 
				
			||||||
 | 
					    \ingroup RAPIDJSON_CONFIG
 | 
				
			||||||
 | 
					    \brief Version of RapidJSON in "<major>.<minor>.<patch>" string format.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					#define RAPIDJSON_MAJOR_VERSION 1
 | 
				
			||||||
 | 
					#define RAPIDJSON_MINOR_VERSION 0
 | 
				
			||||||
 | 
					#define RAPIDJSON_PATCH_VERSION 0
 | 
				
			||||||
 | 
					#define RAPIDJSON_VERSION_STRING \
 | 
				
			||||||
 | 
					    RAPIDJSON_STRINGIFY(RAPIDJSON_MAJOR_VERSION.RAPIDJSON_MINOR_VERSION.RAPIDJSON_PATCH_VERSION)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
// RAPIDJSON_NAMESPACE_(BEGIN|END)
 | 
					// RAPIDJSON_NAMESPACE_(BEGIN|END)
 | 
				
			||||||
/*! \def RAPIDJSON_NAMESPACE
 | 
					/*! \def RAPIDJSON_NAMESPACE
 | 
				
			||||||
@@ -353,10 +387,6 @@ RAPIDJSON_NAMESPACE_END
 | 
				
			|||||||
#define RAPIDJSON_VERSION_CODE(x,y,z) \
 | 
					#define RAPIDJSON_VERSION_CODE(x,y,z) \
 | 
				
			||||||
  (((x)*100000) + ((y)*100) + (z))
 | 
					  (((x)*100000) + ((y)*100) + (z))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// token stringification
 | 
					 | 
				
			||||||
#define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x)
 | 
					 | 
				
			||||||
#define RAPIDJSON_DO_STRINGIFY(x) #x
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF
 | 
					// RAPIDJSON_DIAG_PUSH/POP, RAPIDJSON_DIAG_OFF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,7 @@
 | 
				
			|||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## A fast JSON parser/generator for C++ with both SAX/DOM style API 
 | 
					## A fast JSON parser/generator for C++ with both SAX/DOM style API 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Tencent is pleased to support the open source community by making RapidJSON available.
 | 
					Tencent is pleased to support the open source community by making RapidJSON available.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||

 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Tencent is pleased to support the open source community by making RapidJSON available.
 | 
					Tencent is pleased to support the open source community by making RapidJSON available.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
 | 
					Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,10 +13,13 @@
 | 
				
			|||||||
// specific language governing permissions and limitations under the License.
 | 
					// specific language governing permissions and limitations under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "unittest.h"
 | 
					#include "unittest.h"
 | 
				
			||||||
 | 
					#include "rapidjson/rapidjson.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char **argv) {
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
    ::testing::InitGoogleTest(&argc, argv);
 | 
					    ::testing::InitGoogleTest(&argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::cout << "RapidJSON v" << RAPIDJSON_VERSION_STRING << std::endl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if _MSC_VER
 | 
					#if _MSC_VER
 | 
				
			||||||
    _CrtMemState memoryState = { 0 };
 | 
					    _CrtMemState memoryState = { 0 };
 | 
				
			||||||
    _CrtMemCheckpoint(&memoryState);
 | 
					    _CrtMemCheckpoint(&memoryState);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user