[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5fef06f: * src/json.c (lisp_to_json): Simplify.
From: |
Philipp Stephani |
Subject: |
master 5fef06f: * src/json.c (lisp_to_json): Simplify. |
Date: |
Sun, 9 Aug 2020 13:33:07 -0400 (EDT) |
branch: master
commit 5fef06fcf7ba284f206061293c3f9bcfac2daafc
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
* src/json.c (lisp_to_json): Simplify.
---
src/json.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/json.c b/src/json.c
index 814afc6..8c95836 100644
--- 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5fef06f: * src/json.c (lisp_to_json): Simplify.,
Philipp Stephani <=