aboutsummaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorPhilipp Stephani2018-09-21 21:56:25 +0200
committerPhilipp Stephani2018-09-21 21:56:56 +0200
commitee3be3fdfa96d7d1a0740c8145a26d758c12a711 (patch)
tree57fde5b97151c85fb75fc67ce612493e7613d800 /src/json.c
parent9f10e1a0eef0dd5572a34a76617d50df0e3dd357 (diff)
downloademacs-ee3be3fdfa96d7d1a0740c8145a26d758c12a711.tar.gz
emacs-ee3be3fdfa96d7d1a0740c8145a26d758c12a711.zip
Use new function overflow_error in a few places
* src/emacs-module.c (module_make_global_ref, module_funcall) (module_make_string, Fmodule_load): * src/json.c (json_to_lisp): Use overflow_error.
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/json.c b/src/json.c
index 8b365e3795c..17cc0965b12 100644
--- a/src/json.c
+++ b/src/json.c
@@ -740,7 +740,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
740 xsignal0 (Qjson_object_too_deep); 740 xsignal0 (Qjson_object_too_deep);
741 size_t size = json_array_size (json); 741 size_t size = json_array_size (json);
742 if (FIXNUM_OVERFLOW_P (size)) 742 if (FIXNUM_OVERFLOW_P (size))
743 xsignal0 (Qoverflow_error); 743 overflow_error ();
744 Lisp_Object result = Fmake_vector (make_fixed_natnum (size), Qunbound); 744 Lisp_Object result = Fmake_vector (make_fixed_natnum (size), Qunbound);
745 for (ptrdiff_t i = 0; i < size; ++i) 745 for (ptrdiff_t i = 0; i < size; ++i)
746 ASET (result, i, 746 ASET (result, i,
@@ -759,7 +759,7 @@ json_to_lisp (json_t *json, struct json_configuration *conf)
759 { 759 {
760 size_t size = json_object_size (json); 760 size_t size = json_object_size (json);
761 if (FIXNUM_OVERFLOW_P (size)) 761 if (FIXNUM_OVERFLOW_P (size))
762 xsignal0 (Qoverflow_error); 762 overflow_error ();
763 result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize, 763 result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize,
764 make_fixed_natnum (size)); 764 make_fixed_natnum (size));
765 struct Lisp_Hash_Table *h = XHASH_TABLE (result); 765 struct Lisp_Hash_Table *h = XHASH_TABLE (result);