1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Cleanup terminology in Buffer/Variant/String macros.

This commit is contained in:
David Steele 2023-01-02 17:26:53 +07:00
parent f018912908
commit 66f108ea8a
4 changed files with 10 additions and 10 deletions

View File

@ -178,15 +178,15 @@ By convention all buffer constant identifiers are appended with _BUF.
#define BUFSTRDEF(stringdef) \
BUF((unsigned char *)stringdef, (sizeof(stringdef) - 1))
// Used to declare buffer constants that will be externed using BUFFER_DECLARE(). Must be used in a .c file.
// Used to define String Buffer constants that will be externed using BUFFER_DECLARE(). Must be used in a .c file.
#define BUFFER_STRDEF_EXTERN(name, string) \
VR_EXTERN_DEFINE const Buffer *const name = BUFSTRDEF(string)
// Used to declare buffer constants that will be local to the .c file. Must be used in a .c file.
// Used to define String Buffer constants that will be local to the .c file. Must be used in a .c file.
#define BUFFER_STRDEF_STATIC(name, string) \
static const Buffer *const name = BUFSTRDEF(string)
// Used to extern buffer constants declared with BUFFER_STRDEF_EXTERN(. Must be used in a .h file.
// Used to declare externed Buffer constants defined with BUFFER*EXTERN(). Must be used in a .h file.
#define BUFFER_DECLARE(name) \
VR_EXTERN_DECLARE const Buffer *const name

View File

@ -229,15 +229,15 @@ By convention all string constant identifiers are appended with _STR.
#define STRDEF(buffer) \
STR_SIZE(buffer, sizeof(buffer) - 1)
// Used to declare String constants that will be externed using STRING_DECLARE(). Must be used in a .c file.
// Used to define String constants that will be externed using STRING_DECLARE(). Must be used in a .c file.
#define STRING_EXTERN(name, buffer) \
VR_EXTERN_DEFINE const String *const name = STRDEF(buffer)
// Used to declare String constants that will be local to the .c file. Must be used in a .c file.
// Used to define String constants that will be local to the .c file. Must be used in a .c file.
#define STRING_STATIC(name, buffer) \
static const String *const name = STRDEF(buffer)
// Used to extern String constants declared with STRING_EXTERN(). Must be used in a .h file.
// Used to declare externed String constants defined with STRING_EXTERN(). Must be used in a .h file.
#define STRING_DECLARE(name) \
VR_EXTERN_DECLARE const String *const name

View File

@ -19,7 +19,7 @@ Variant Data Type
/***********************************************************************************************************************************
Constant variants that are generally useful
***********************************************************************************************************************************/
// Used to declare Bool Variant constants that will be externed using VARIANT_DECLARE(). Must be used in a .c file.
// Used to define Bool Variant constants that will be externed using VARIANT_DECLARE().
#define VARIANT_BOOL_EXTERN(name, dataParam) \
VR_EXTERN_DEFINE const Variant *const name = ((const Variant *)&(const VariantBoolPub){.type = varTypeBool, .data = dataParam})

View File

@ -191,11 +191,11 @@ By convention all variant constant identifiers are appended with _VAR.
#define VARSTR(dataParam) \
((const Variant *)&(const VariantStringPub){.type = varTypeString, .data = (String *)(dataParam)})
// Used to declare String Variant constants that will be externed using VARIANT_DECLARE(). Must be used in a .c file.
// Used to define String Variant constants that will be externed using VARIANT_DECLARE(). Must be used in a .c file.
#define VARIANT_STRDEF_EXTERN(name, dataParam) \
VR_EXTERN_DEFINE const Variant *const name = VARSTRDEF(dataParam)
// Used to declare String Variant constants that will be local to the .c file. Must be used in a .c file.
// Used to define String Variant constants that will be local to the .c file. Must be used in a .c file.
#define VARIANT_STRDEF_STATIC(name, dataParam) \
static const Variant *const name = VARSTRDEF(dataParam)
@ -207,7 +207,7 @@ By convention all variant constant identifiers are appended with _VAR.
#define VARUINT64(dataParam) \
((const Variant *)&(const VariantUInt64Pub){.type = varTypeUInt64, .data = dataParam})
// Used to extern String Variant constants declared with VARIANT_STRDEF_EXTERN/STATIC(). Must be used in a .h file.
// Used to declare externed String Variant constants defined with VARIANT*EXTERN(). Must be used in a .h file.
#define VARIANT_DECLARE(name) \
VR_EXTERN_DECLARE const Variant *const name