kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 29eb5b1537b20b0422a5b19c60b2778e1155ece8
parent f3135d5e71c80e4d4e5d1a90fc66e4e2dcd7f837
Author: Joris Vink <joris@coders.se>
Date:   Sun, 20 Feb 2022 20:32:39 +0100

Explicitly cast integer args for JSON create apis

Diffstat:
include/kore/kore.h | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/kore/kore.h b/include/kore/kore.h @@ -569,13 +569,13 @@ struct kore_buf { kore_json_create_item(o, n, KORE_JSON_TYPE_STRING, v) #define kore_json_create_number(o, n, v) \ - kore_json_create_item(o, n, KORE_JSON_TYPE_NUMBER, v) + kore_json_create_item(o, n, KORE_JSON_TYPE_NUMBER, (double)v) #define kore_json_create_integer(o, n, v) \ - kore_json_create_item(o, n, KORE_JSON_TYPE_INTEGER, v) + kore_json_create_item(o, n, KORE_JSON_TYPE_INTEGER, (int64_t)v) #define kore_json_create_integer_u64(o, n, v) \ - kore_json_create_item(o, n, KORE_JSON_TYPE_INTEGER_U64, v) + kore_json_create_item(o, n, KORE_JSON_TYPE_INTEGER_U64, (u_int64_t)v) #define kore_json_create_literal(o, n, v) \ kore_json_create_item(o, n, KORE_JSON_TYPE_LITERAL, v)