BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
BSLConfig.h File Reference

Compile-time static configuration for the BSL. More...

#include "BSLMemory.h"
#include <stdlib.h>
+ Include dependency graph for BSLConfig.h:
+ This graph shows which files directly or indirectly include this file:

Macros

#define BSL_VERSION   "1.1.1"
 Compile-time library version based on SemVer-2.0.0 conventions.
 
#define BSL_VERSION_MAJOR   1
 Compile-time major version number.
 
#define BSL_VERSION_MINOR   1
 Compile-time minor version number.
 
#define BSL_VERSION_PATCH   1
 Compile-time patch version number.
 
#define BSL_LOG_PLAINTEXT_ENABLE   0
 Control whether plaintext data debug logs are made.
 
#define M_MEMORY_ALLOC(ctx, type)   ((type *) BSL_malloc(sizeof(type)))
 Force the use of M_ prefixed macros for M*LIB.
 
#define M_MEMORY_DEL(ctx, ptr)   BSL_free(ptr)
 Define to override value/struct deallocation.
 
#define M_MEMORY_REALLOC(ctx, type, ptr, o, n)   (M_UNLIKELY((n) > SIZE_MAX / sizeof(type)) ? (type *) NULL : (type *) BSL_realloc((ptr), (n)*sizeof (type)))
 Define to override array allocation.
 
#define M_MEMORY_FREE(ctx, type, ptr, o)   BSL_free(ptr)
 Define to override array deallocation.
 

Functions

const char * bsl_version (void)
 Run-time library version based on SemVer-2.0.0 conventions.
 

Detailed Description

Compile-time static configuration for the BSL.

Macro Definition Documentation

◆ BSL_LOG_PLAINTEXT_ENABLE

#define BSL_LOG_PLAINTEXT_ENABLE   0

Control whether plaintext data debug logs are made.

Warning
This should not be enabled for production.

◆ BSL_VERSION

#define BSL_VERSION   "1.1.1"

Compile-time library version based on SemVer-2.0.0 conventions.

See also
Use bsl_version() to get run-time version.

◆ BSL_VERSION_MAJOR

#define BSL_VERSION_MAJOR   1

Compile-time major version number.

◆ BSL_VERSION_MINOR

#define BSL_VERSION_MINOR   1

Compile-time minor version number.

◆ BSL_VERSION_PATCH

#define BSL_VERSION_PATCH   1

Compile-time patch version number.

◆ M_MEMORY_ALLOC

#define M_MEMORY_ALLOC (   ctx,
  type 
)    ((type *) BSL_malloc(sizeof(type)))

Force the use of M_ prefixed macros for M*LIB.

Define to override value/struct allocation. See m-core.h for details.

◆ M_MEMORY_DEL

#define M_MEMORY_DEL (   ctx,
  ptr 
)    BSL_free(ptr)

Define to override value/struct deallocation.

See m-core.h for details.

◆ M_MEMORY_FREE

#define M_MEMORY_FREE (   ctx,
  type,
  ptr,
 
)    BSL_free(ptr)

Define to override array deallocation.

See m-core.h for details.

◆ M_MEMORY_REALLOC

#define M_MEMORY_REALLOC (   ctx,
  type,
  ptr,
  o,
 
)    (M_UNLIKELY((n) > SIZE_MAX / sizeof(type)) ? (type *) NULL : (type *) BSL_realloc((ptr), (n)*sizeof (type)))

Define to override array allocation.

See m-core.h for details.

Function Documentation

◆ bsl_version()

const char * bsl_version ( void  )

Run-time library version based on SemVer-2.0.0 conventions.

Note
This may be different than BSL_VERSION if using dynamic linking.
Returns
The text form of the library version linked at runtime.

References BSL_VERSION.