aboutsummaryrefslogtreecommitdiffstats
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)
284#endif 284#endif
285 xsignal (symbol, 285 xsignal (symbol,
286 list5 (json_build_string (error->text), 286 list5 (json_build_string (error->text),
287 json_build_string (error->source), make_natnum (error->line), 287 json_build_string (error->source), make_fixed_natnum (error->line),
288 make_natnum (error->column), make_natnum (error->position))); 288 make_fixed_natnum (error->column), make_fixed_natnum (error->position)));
289} 289}
290 290
291static void 291static void
@@ -482,7 +482,7 @@ lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
482 return json_check (json_false ()); 482 return json_check (json_false ());
483 else if (EQ (lisp, Qt)) 483 else if (EQ (lisp, Qt))
484 return json_check (json_true ()); 484 return json_check (json_true ());
485 else if (INTEGERP (lisp)) 485 else if (FIXNUMP (lisp))
486 { 486 {
487 CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp); 487 CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp);
488 return json_check (json_integer (XINT (lisp))); 488 return json_check (json_integer (XINT (lisp)));
@@ -735,7 +735,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
735 size_t size = json_array_size (json); 735 size_t size = json_array_size (json);
736 if (FIXNUM_OVERFLOW_P (size)) 736 if (FIXNUM_OVERFLOW_P (size))
737 xsignal0 (Qoverflow_error); 737 xsignal0 (Qoverflow_error);
738 Lisp_Object result = Fmake_vector (make_natnum (size), Qunbound); 738 Lisp_Object result = Fmake_vector (make_fixed_natnum (size), Qunbound);
739 for (ptrdiff_t i = 0; i < size; ++i) 739 for (ptrdiff_t i = 0; i < size; ++i)
740 ASET (result, i, 740 ASET (result, i,
741 json_to_lisp (json_array_get (json, i), conf)); 741 json_to_lisp (json_array_get (json, i), conf));
@@ -755,7 +755,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
755 if (FIXNUM_OVERFLOW_P (size)) 755 if (FIXNUM_OVERFLOW_P (size))
756 xsignal0 (Qoverflow_error); 756 xsignal0 (Qoverflow_error);
757 result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize, 757 result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize,
758 make_natnum (size)); 758 make_fixed_natnum (size));
759 struct Lisp_Hash_Table *h = XHASH_TABLE (result); 759 struct Lisp_Hash_Table *h = XHASH_TABLE (result);
760 const char *key_str; 760 const char *key_str;
761 json_t *value; 761 json_t *value;