Content-Length: 295994 | pFad | http://github.com/postgrespro/postgres/commit/2fe4c7384f469e077928cd40fa1da4bd05598f1f

5C Make AssertPointerAlignment available to frontend code · postgrespro/postgres@2fe4c73 · GitHub
Skip to content

Commit 2fe4c73

Browse files
committed
Make AssertPointerAlignment available to frontend code
We don't need separate definitions for frontend and backend, since the contained Assert() will take care of the difference. So this also makes it simpler overall. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/f64365b1-d5f9-ef83-41fe-404810f10e5a@enterprisedb.com
1 parent dea8349 commit 2fe4c73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/include/c.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,14 +793,12 @@ typedef NameData *Name;
793793

794794
#define Assert(condition) ((void)true)
795795
#define AssertMacro(condition) ((void)true)
796-
#define AssertPointerAlignment(ptr, bndr) ((void)true)
797796

798797
#elif defined(FRONTEND)
799798

800799
#include <assert.h>
801800
#define Assert(p) assert(p)
802801
#define AssertMacro(p) ((void) assert(p))
803-
#define AssertPointerAlignment(ptr, bndr) ((void)true)
804802

805803
#else /* USE_ASSERT_CHECKING && !FRONTEND */
806804

@@ -824,14 +822,14 @@ typedef NameData *Name;
824822
((void) ((condition) || \
825823
(ExceptionalCondition(#condition, __FILE__, __LINE__), 0)))
826824

825+
#endif /* USE_ASSERT_CHECKING && !FRONTEND */
826+
827827
/*
828828
* Check that `ptr' is `bndr' aligned.
829829
*/
830830
#define AssertPointerAlignment(ptr, bndr) \
831831
Assert(TYPEALIGN(bndr, (uintptr_t)(ptr)) == (uintptr_t)(ptr))
832832

833-
#endif /* USE_ASSERT_CHECKING && !FRONTEND */
834-
835833
/*
836834
* ExceptionalCondition is compiled into the backend whether or not
837835
* USE_ASSERT_CHECKING is defined, so as to support use of extensions

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/2fe4c7384f469e077928cd40fa1da4bd05598f1f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy