pgbackrest.git / summary / log / commit / refs

commit    66f108ea8a01ac881a47f4cbd8d5fb3ca8102e1d
Author:   David Steele <david@pgmasters.net>
Date:     Mon Jan 02 10:26:53 2023 +0000

    Cleanup terminology in Buffer/Variant/String macros.


src/common/type/buffer.h | 6 +++--- src/common/type/string.h | 6 +++--- src/common/type/variant.c | 2 +- src/common/type/variant.h | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/common/type/buffer.h b/src/common/type/buffer.h index e352e6e3e..628f3cf27 100644 --- a/src/common/type/buffer.h +++ b/src/common/type/buffer.h @@ -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 diff --git a/src/common/type/string.h b/src/common/type/string.h index 4619660f5..d85d09e3e 100644 --- a/src/common/type/string.h +++ b/src/common/type/string.h @@ -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 diff --git a/src/common/type/variant.c b/src/common/type/variant.c index c7a839302..cdf162339 100644 --- a/src/common/type/variant.c +++ b/src/common/type/variant.c @@ -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}) diff --git a/src/common/type/variant.h b/src/common/type/variant.h index 6cff2965c..6548eac0e 100644 --- a/src/common/type/variant.h +++ b/src/common/type/variant.h @@ -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 [parent: f01891290884]