| 14 | } |
| 15 | |
| 16 | static void test_int64(acl::json& json, const char* name) |
| 17 | { |
| 18 | const std::vector<acl::json_node*>& nodes = json.getElementsByTagName(name); |
| 19 | if (nodes.empty()) |
| 20 | printf("%s not found\r\n", name); |
| 21 | else |
| 22 | { |
| 23 | const long long int* n = nodes[0]->get_int64(); |
| 24 | if (n == NULL) |
| 25 | { |
| 26 | printf("%s: NULL\r\n", name); |
| 27 | return; |
| 28 | } |
| 29 | #if defined(_WIN32) || defined(_WIN64) |
| 30 | printf("%s: %I64u, %I64d\r\n", name, *n, *n); |
| 31 | #else |
| 32 | printf("%s: %llu, %lld\r\n", name, *n, *n); |
| 33 | #endif |
| 34 | } |
| 35 | } |
| 36 | #include <iostream> |
| 37 | int main() |
| 38 | { |