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

Commit3edc71e

Browse files
committed
Convert macros to static inline functions (rel.h)
Reviewed-by: Amul Sul <sulamul@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/5b558da8-99fb-0a99-83dd-f72f05388517%40enterprisedb.com
1 parentf14aad5 commit3edc71e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

‎src/include/utils/rel.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -572,22 +572,21 @@ RelationGetSmgr(Relation rel)
572572
smgrsetowner(&(rel->rd_smgr),smgropen(rel->rd_locator,rel->rd_backend));
573573
returnrel->rd_smgr;
574574
}
575-
#endif
576575

577576
/*
578577
* RelationCloseSmgr
579578
*Close the relation at the smgr level, if not already done.
580-
*
581-
* Note: smgrclose should unhook from owner pointer, hence the Assert.
582579
*/
583-
#defineRelationCloseSmgr(relation) \
584-
do { \
585-
if ((relation)->rd_smgr != NULL) \
586-
{ \
587-
smgrclose((relation)->rd_smgr); \
588-
Assert((relation)->rd_smgr == NULL); \
589-
} \
590-
} while (0)
580+
staticinlinevoid
581+
RelationCloseSmgr(Relationrelation)
582+
{
583+
if (relation->rd_smgr!=NULL)
584+
smgrclose(relation->rd_smgr);
585+
586+
/* smgrclose should unhook from owner pointer */
587+
Assert(relation->rd_smgr==NULL);
588+
}
589+
#endif/* !FRONTEND */
591590

592591
/*
593592
* RelationGetTargetBlock

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp