emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 13feb31 6/6: Rename ALIGN to pointer_align


From: Paul Eggert
Subject: [Emacs-diffs] master 13feb31 6/6: Rename ALIGN to pointer_align
Date: Sun, 19 Jun 2016 02:33:05 +0000 (UTC)

branch: master
commit 13feb31c633a26ce47799315326e43d1e8b9345a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Rename ALIGN to pointer_align
    
    * src/alloc.c (pointer_align): Rename from ALIGN.
    This fixes Bug#23764 in a simpler way.
---
 src/alloc.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 8173615..0a3e7d4 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -486,15 +486,10 @@ static void *pure_alloc (size_t, int);
                       ? ((x) + (y) - 1) - ((x) + (y) - 1) % (y)        \
                       : ((x) + (y) - 1) & ~ ((y) - 1))
 
-/* Bug#23764  */
-#ifdef ALIGN
-# undef ALIGN
-#endif
-
 /* Return PTR rounded up to the next multiple of ALIGNMENT.  */
 
 static void *
-ALIGN (void *ptr, int alignment)
+pointer_align (void *ptr, int alignment)
 {
   return (void *) ROUNDUP ((uintptr_t) ptr, alignment);
 }
@@ -1259,7 +1254,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
       abase = base = aligned_alloc (BLOCK_ALIGN, ABLOCKS_BYTES);
 #else
       base = malloc (ABLOCKS_BYTES);
-      abase = ALIGN (base, BLOCK_ALIGN);
+      abase = pointer_align (base, BLOCK_ALIGN);
 #endif
 
       if (base == 0)
@@ -5178,7 +5173,7 @@ pure_alloc (size_t size, int type)
     {
       /* Allocate space for a Lisp object from the beginning of the free
         space with taking account of alignment.  */
-      result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT);
+      result = pointer_align (purebeg + pure_bytes_used_lisp, GCALIGNMENT);
       pure_bytes_used_lisp = ((char *)result - (char *)purebeg) + size;
     }
   else



reply via email to

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