Commit eaea40b3 authored by Philipp Stephani's avatar Philipp Stephani

Use high-level integer conversion macro in a few cases.

INT_TO_INTEGER is more obviously correct and means we don’t have to
worry about data type sizes and signedness.

* src/json.c (json_parse_error): Use INT_TO_INTEGER.  The tiny
performance gain of make_fixed_natnum isn’t worth the trouble then
signaling an error.
parent ecab8835
......@@ -304,8 +304,8 @@ json_parse_error (const json_error_t *error)
xsignal (symbol,
list5 (json_build_string (error->text),
json_build_string (error->source), make_fixed_natnum (error->line),
make_fixed_natnum (error->column), make_fixed_natnum (error->position)));
json_build_string (error->source), INT_TO_INTEGER (error->line),
INT_TO_INTEGER (error->column), INT_TO_INTEGER (error->position)));
static void
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment