Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2fe4c73

Browse files
committed
Make AssertPointerAlignment available to frontend code
We don't need separate definitions for frontend and backend, since thecontained Assert() will take care of the difference. So this alsomakes 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 parentdea8349 commit2fe4c73

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
#defineAssert(condition)((void)true)
795795
#defineAssertMacro(condition)((void)true)
796-
#defineAssertPointerAlignment(ptr,bndr)((void)true)
797796

798797
#elif defined(FRONTEND)
799798

800799
#include<assert.h>
801800
#defineAssert(p) assert(p)
802801
#defineAssertMacro(p)((void) assert(p))
803-
#defineAssertPointerAlignment(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
#defineAssertPointerAlignment(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)

[8]ページ先頭

©2009-2025 Movatter.jp