1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-13 01:00:23 +02:00

Improve P/PP type macro handling.

Rather than create _P/_PP variants for every type that needs to pass/return pointers, create FUNCTION_*_P/PP() macros that will properly pass or return any single/double pointer types.

There remain a few unresolved edge cases such as CHARPY but this handles the majority of types well.
This commit is contained in:
David Steele
2019-01-28 22:33:29 +02:00
parent 8b2a344cfe
commit b5a103f2df
35 changed files with 231 additions and 165 deletions

View File

@ -76,7 +76,7 @@ static void
ioTestFilterSizeProcess(IoTestFilterSize *this, const Buffer *buffer)
{
FUNCTION_LOG_BEGIN(logLevelTrace);
FUNCTION_LOG_PARAM(VOIDP, this);
FUNCTION_LOG_PARAM_P(VOID, this);
FUNCTION_LOG_PARAM(BUFFER, buffer);
FUNCTION_LOG_PARAM(STRING, ioFilterType(this->filter));
FUNCTION_LOG_PARAM(SIZE, this->size);
@ -133,7 +133,7 @@ static void
ioTestFilterMultiplyProcess(IoTestFilterMultiply *this, const Buffer *input, Buffer *output)
{
FUNCTION_LOG_BEGIN(logLevelTrace);
FUNCTION_LOG_PARAM(VOIDP, this);
FUNCTION_LOG_PARAM_P(VOID, this);
FUNCTION_LOG_PARAM(BUFFER, input);
FUNCTION_LOG_PARAM(BUFFER, output);
FUNCTION_LOG_END();