You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Move MACRO_TO_STR() to common/debug.h.
This macro is handy for constructing static message strings so move it where the core code can see it.
This commit is contained in:
@ -137,6 +137,10 @@
|
||||
<p>Rename <code>common/io/handle</code> module to <code>common/io/handleWrite</code>.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Move <code>MACRO_TO_STR()</code> to <file>common/debug.h</file>.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Add <code>const VariantList *</code> debug type.</p>
|
||||
</release-item>
|
||||
|
@ -25,6 +25,14 @@ Extern variables that are needed for unit testing
|
||||
static
|
||||
#endif
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Convert a macro to a string
|
||||
***********************************************************************************************************************************/
|
||||
#define MACRO_TO_STR_INNER(macro) \
|
||||
#macro
|
||||
#define MACRO_TO_STR(macro) \
|
||||
MACRO_TO_STR_INNER(macro)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Base function debugging macros
|
||||
|
||||
|
@ -6,6 +6,7 @@ C Test Harness
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/error.h"
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
@ -33,14 +34,6 @@ void testExpectPathSet(const char *testExpectPath);
|
||||
const char *testRepoPath(void);
|
||||
void testRepoPathSet(const char *testRepoPath);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Convert a macro to a string -- handy for testing debug macros
|
||||
***********************************************************************************************************************************/
|
||||
#define MACRO_TO_STR_INNER(macro) \
|
||||
#macro
|
||||
#define MACRO_TO_STR(macro) \
|
||||
MACRO_TO_STR_INNER(macro)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Maximum size of a formatted result in the TEST_RESULT macro. Strings don't count as they are output directly, so this only applies
|
||||
to the formatting of bools, ints, floats, etc. This should be plenty of room for any of those types.
|
||||
|
Reference in New Issue
Block a user