From 9271076eff708bdd066d9b80525712e6b6dc750e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8B=87=E7=90=A6?= Date: Mon, 24 Mar 2025 11:03:09 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=BC=80cJSON=E5=AF=B9int64=5Ft?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=94=AF=E6=8C=81=20Signed-off-by:y?= =?UTF-8?q?ang=5Fyong=5Fqi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨勇琦 --- cJSON.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON.h b/cJSON.h index 50d3395..51a3aff 100644 --- a/cJSON.h +++ b/cJSON.h @@ -126,7 +126,7 @@ typedef struct cJSON long long valueint; #else /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */ - int valueint; + long long valueint; #endif /* __CJSON_USE_INT64 */ /* The item's number, if type==cJSON_Number */ double valuedouble; -- Gitee From 967c07f8498293bf98843bdebb4a2d79d98914f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8B=87=E7=90=A6?= Date: Mon, 24 Mar 2025 11:03:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E5=BC=80cJSON=E5=AF=B9int64=5Ft?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=E6=94=AF=E6=8C=81=20Signed-off-by:y?= =?UTF-8?q?ang=5Fyong=5Fqi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杨勇琦 --- BUILD.gn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index e61b60a..59357a9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -42,7 +42,10 @@ if (defined(ohos_lite)) { import("//build/ohos.gni") config("cJSON_config") { include_dirs = [ "//third_party/cJSON" ] - defines = [ "CJSON_NESTING_LIMIT=(128)" ] + defines = [ + "CJSON_NESTING_LIMIT=(128)", + "ENABLE_INT64", + ] } ohos_static_library("cjson_static") { branch_protector_ret = "pac_ret" -- Gitee