]> git.eshelyaron.com Git - emacs.git/commitdiff
Use high-level integer conversion macro in a few cases.
authorPhilipp Stephani <phst@google.com>
Tue, 23 Apr 2019 14:48:49 +0000 (16:48 +0200)
committerPhilipp Stephani <phst@google.com>
Tue, 23 Apr 2019 14:51:10 +0000 (16:51 +0200)
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.

src/json.c

index 7d6d5314270124a65c14881296046767f98bc0ed..03468e9f3380248efaff18b7378a07df4dab331a 100644 (file)
@@ -304,8 +304,8 @@ json_parse_error (const json_error_t *error)
 #endif
   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