#include "yajl_parser.h" #include #include long long yajl_parse_integer(const unsigned char *number, unsigned int length) { try { return FromString((const char*)number, length); } catch (const yexception& ex) { errno = ERANGE; return (*number == '-') ? LLONG_MIN : LLONG_MAX; } } unsigned long long yajl_parse_unsigned_integer(const unsigned char *number, unsigned int length) { try { return FromString((const char*)number, length); } catch (const yexception& ex) { errno = ERANGE; return (*number == '-') ? 0ull : ULLONG_MAX; } } extern "C" void FormatDoubleYandex(char* buf, size_t len, double val) { buf[ToString(val, buf, len)] = 0; }