From 240c7c131bdbac494e1e954fbbffb957dcbbcd7f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 19 May 2024 08:48:52 -0700 Subject: [PATCH] Tweak STORE_NUMBER arg type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/regex-emacs.c (STORE_NUMBER): Make the arg int, not int16_t. There’s no need for the caller to convert to int16_t, and using int makes the machine code a bit smaller (and presumably a bit faster) on x86-64 with GCC 14. (cherry picked from commit 98b83bdc9f4af7798e3314ad8df6ab78efd60f8a) --- src/regex-emacs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex-emacs.c b/src/regex-emacs.c index 0ec0c6eb63f..92dbdbecbf1 100644 --- a/src/regex-emacs.c +++ b/src/regex-emacs.c @@ -341,7 +341,7 @@ typedef enum /* Store NUMBER in two contiguous bytes starting at DESTINATION. */ static void -STORE_NUMBER (unsigned char *destination, int16_t number) +STORE_NUMBER (unsigned char *destination, int number) { (destination)[0] = (number) & 0377; (destination)[1] = (number) >> 8; -- 2.39.2