You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Replace OBJECT_DEFINE_FREE_RESOURCE_BEGIN() with normal functions.
OBJECT_DEFINE_MOVE() and OBJECT_DEFINE_FREE() will be replaced with inlines so this would be the only macro left that is constructing functions. It is not a great pattern anyway since it makes it hard to find the function implementation.
This commit is contained in:
@ -34,11 +34,21 @@ OBJECT_DEFINE_FREE(PG_CLIENT);
|
||||
/***********************************************************************************************************************************
|
||||
Close protocol connection
|
||||
***********************************************************************************************************************************/
|
||||
OBJECT_DEFINE_FREE_RESOURCE_BEGIN(PG_CLIENT, LOG, logLevelTrace)
|
||||
static void
|
||||
pgClientFreeResource(THIS_VOID)
|
||||
{
|
||||
THIS(PgClient);
|
||||
|
||||
FUNCTION_LOG_BEGIN(logLevelTrace);
|
||||
FUNCTION_LOG_PARAM(PG_CLIENT, this);
|
||||
FUNCTION_LOG_END();
|
||||
|
||||
ASSERT(this != NULL);
|
||||
|
||||
PQfinish(this->connection);
|
||||
|
||||
FUNCTION_LOG_RETURN_VOID();
|
||||
}
|
||||
OBJECT_DEFINE_FREE_RESOURCE_END(LOG);
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
PgClient *
|
||||
|
Reference in New Issue
Block a user