projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
781bcce
)
* src/json.c (lisp_to_json): Simplify.
author
Philipp Stephani
<phst@google.com>
Sun, 9 Aug 2020 17:31:01 +0000
(19:31 +0200)
committer
Philipp Stephani
<phst@google.com>
Sun, 9 Aug 2020 17:31:26 +0000
(19:31 +0200)
src/json.c
patch
|
blob
|
history
diff --git
a/src/json.c
b/src/json.c
index 814afc6d741774a166de27cee2b2ea72236c8e26..8c9583631ad23279898d45746786a96a0f1bcd79 100644
(file)
--- a/
src/json.c
+++ b/
src/json.c
@@
-479,9
+479,7
@@
lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
{
intmax_t low = TYPE_MINIMUM (json_int_t);
intmax_t high = TYPE_MAXIMUM (json_int_t);
- intmax_t value;
- if (! (integer_to_intmax (lisp, &value) && low <= value && value <= high))
- args_out_of_range_3 (lisp, make_int (low), make_int (high));
+ intmax_t value = check_integer_range (lisp, low, high);
return json_check (json_integer (value));
}
else if (FLOATP (lisp))