mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
Major rework of 64 integer support: 64 bits integer are only returned when explicitly request via Json::Value::asInt64(), unlike previous implementation where Json::Value::asInt() returned a 64 bits integer.
This eases porting portable code and does not break compatibility with the previous release. Json::Value::asLargestInt() has also be added to ease writing portable code independent of 64 bits integer support. It is typically used to implement writers.
This commit is contained in:
@@ -63,7 +63,7 @@ isControlCharacter(char ch)
|
||||
|
||||
enum {
|
||||
/// Constant that specify the size of the buffer that must be passed to uintToString.
|
||||
uintToStringBufferSize = 3*sizeof(UInt)+1
|
||||
uintToStringBufferSize = 3*sizeof(LargestUInt)+1
|
||||
};
|
||||
|
||||
// Defines a char buffer for use with uintToString().
|
||||
@@ -76,7 +76,7 @@ typedef char UIntToStringBuffer[uintToStringBufferSize];
|
||||
* Must have at least uintToStringBufferSize chars free.
|
||||
*/
|
||||
static inline void
|
||||
uintToString( UInt value,
|
||||
uintToString( LargestUInt value,
|
||||
char *¤t )
|
||||
{
|
||||
*--current = 0;
|
||||
|
Reference in New Issue
Block a user