|
|
@ -25,9 +25,11 @@ public: |
|
|
|
typ = initialType; |
|
|
|
val = initialStr; |
|
|
|
} |
|
|
|
#ifdef __APPLE__ |
|
|
|
UniValue(size_t val_) { |
|
|
|
setInt(val_); |
|
|
|
} |
|
|
|
#endif |
|
|
|
UniValue(uint64_t val_) { |
|
|
|
setInt(val_); |
|
|
|
} |
|
|
@ -57,7 +59,9 @@ public: |
|
|
|
bool setNull(); |
|
|
|
bool setBool(bool val); |
|
|
|
bool setNumStr(const std::string& val); |
|
|
|
#ifdef __APPLE__ |
|
|
|
bool setInt(size_t val_); |
|
|
|
#endif |
|
|
|
bool setInt(uint64_t val); |
|
|
|
bool setInt(int64_t val); |
|
|
|
bool setInt(int val_) { return setInt((int64_t)val_); } |
|
|
@ -96,10 +100,12 @@ public: |
|
|
|
std::string s(val_); |
|
|
|
return push_back(s); |
|
|
|
} |
|
|
|
#ifdef __APPLE__ |
|
|
|
bool push_back(size_t val_) { |
|
|
|
UniValue tmpVal(val_); |
|
|
|
return push_back(tmpVal); |
|
|
|
} |
|
|
|
#endif |
|
|
|
bool push_back(uint64_t val_) { |
|
|
|
UniValue tmpVal(val_); |
|
|
|
return push_back(tmpVal); |
|
|
@ -198,12 +204,14 @@ static inline std::pair<std::string,UniValue> Pair(const char *cKey, std::string |
|
|
|
return std::make_pair(key, uVal); |
|
|
|
} |
|
|
|
|
|
|
|
#ifdef __APPLE__ |
|
|
|
static inline std::pair<std::string,UniValue> Pair(const char *cKey, size_t sizeVal) |
|
|
|
{ |
|
|
|
std::string key(cKey); |
|
|
|
UniValue uVal(sizeVal); |
|
|
|
return std::make_pair(key, uVal); |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
static inline std::pair<std::string,UniValue> Pair(const char *cKey, uint64_t u64Val) |
|
|
|
{ |
|
|
|