summaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/json.c b/src/json.c
index ea941d7bb5d..da6e34d89c1 100644
--- a/src/json.c
+++ b/src/json.c
@@ -284,8 +284,8 @@ json_parse_error (const json_error_t *error)
#endif
xsignal (symbol,
list5 (json_build_string (error->text),
- json_build_string (error->source), make_natnum (error->line),
- make_natnum (error->column), make_natnum (error->position)));
+ json_build_string (error->source), make_fixed_natnum (error->line),
+ make_fixed_natnum (error->column), make_fixed_natnum (error->position)));
}
static void
@@ -482,7 +482,7 @@ lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
return json_check (json_false ());
else if (EQ (lisp, Qt))
return json_check (json_true ());
- else if (INTEGERP (lisp))
+ else if (FIXNUMP (lisp))
{
CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp);
return json_check (json_integer (XINT (lisp)));
@@ -735,7 +735,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
size_t size = json_array_size (json);
if (FIXNUM_OVERFLOW_P (size))
xsignal0 (Qoverflow_error);
- Lisp_Object result = Fmake_vector (make_natnum (size), Qunbound);
+ Lisp_Object result = Fmake_vector (make_fixed_natnum (size), Qunbound);
for (ptrdiff_t i = 0; i < size; ++i)
ASET (result, i,
json_to_lisp (json_array_get (json, i), conf));
@@ -755,7 +755,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
if (FIXNUM_OVERFLOW_P (size))
xsignal0 (Qoverflow_error);
result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize,
- make_natnum (size));
+ make_fixed_natnum (size));
struct Lisp_Hash_Table *h = XHASH_TABLE (result);
const char *key_str;
json_t *value;