emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master eaea40b 1/2: Use high-level integer conversion macr


From: Philipp Stephani
Subject: [Emacs-diffs] master eaea40b 1/2: Use high-level integer conversion macro in a few cases.
Date: Tue, 23 Apr 2019 11:00:35 -0400 (EDT)

branch: master
commit eaea40b33721513d4c0228af92d5c32400fda0e7
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    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.
---
 src/json.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/json.c b/src/json.c
index 7d6d531..03468e9 100644
--- a/src/json.c
+++ b/src/json.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]