You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.5 KiB
37 lines
1.5 KiB
2 years ago
|
From 46118fd04a49b25bc0c686b07d1b26309ab4e395 Mon Sep 17 00:00:00 2001
|
||
|
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||
|
Date: Sun, 17 Apr 2022 06:46:25 +0900
|
||
|
Subject: [PATCH] json: use unsigned for refernce counter
|
||
|
|
||
|
For other places, we use unsigned for reference counter.
|
||
|
|
||
|
(cherry picked from commit 6dd18b34cf53ab663140f43f8814904c71cc29f7)
|
||
|
|
||
|
Related: #2087652
|
||
|
---
|
||
|
src/shared/json.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/shared/json.c b/src/shared/json.c
|
||
|
index 6d23bdf4f9..bcc109abc2 100644
|
||
|
--- a/src/shared/json.c
|
||
|
+++ b/src/shared/json.c
|
||
|
@@ -41,7 +41,7 @@ assert_cc(DEPTH_MAX <= UINT16_MAX);
|
||
|
|
||
|
typedef struct JsonSource {
|
||
|
/* When we parse from a file or similar, encodes the filename, to indicate the source of a json variant */
|
||
|
- size_t n_ref;
|
||
|
+ unsigned n_ref;
|
||
|
unsigned max_line;
|
||
|
unsigned max_column;
|
||
|
char name[];
|
||
|
@@ -53,7 +53,7 @@ struct JsonVariant {
|
||
|
/* We either maintain a reference counter for this variant itself, or we are embedded into an
|
||
|
* array/object, in which case only that surrounding object is ref-counted. (If 'embedded' is false,
|
||
|
* see below.) */
|
||
|
- size_t n_ref;
|
||
|
+ unsigned n_ref;
|
||
|
|
||
|
/* If this JsonVariant is part of an array/object, then this field points to the surrounding
|
||
|
* JSON_VARIANT_ARRAY/JSON_VARIANT_OBJECT object. (If 'embedded' is true, see below.) */
|