]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak STORE_NUMBER arg type
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 May 2024 15:48:52 +0000 (08:48 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 07:43:29 +0000 (09:43 +0200)
* 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

index 0ec0c6eb63f813e282855df224c21d868a02611c..92dbdbecbf14ab177da68f695b1ee5dc8598e518 100644 (file)
@@ -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;