| Elektra 0.11.0

Macros
kdbmacros.h File Reference

Macros by Elektra. More...

## Macros
#define | ELEKTRA_QUOTE(x) #x
| Surround a value with double quotes.
#define | ELEKTRA_STRINGIFY(x) ELEKTRA_QUOTE (x)
| Surround a macro value with double quotes.
#define | ELEKTRA_CONCAT2(X, Y) X##Y
| Concat two values.
#define | ELEKTRA_CONCAT(X, Y) ELEKTRA_CONCAT2 (X, Y)
| Concat two macro values
#define | ELEKTRA_SET_ERROR_READ_ONLY(info, returned, error)
| Sets error if info != returned.
#define | ELEKTRA_SYMVER(sym, impl) sym##_##impl
| Helper macro to create a versioned name of a symbol.
#define | ELEKTRA_SYMVER_DECLARE(ver, sym, impl) ELEKTRA_SYMVER_COMMAND (ELEKTRA_STRINGIFY (ELEKTRA_SYMVER (sym, impl)), #sym "@" ver)
| Declares another version of a symbol using the `.symver` assembler pseudo command.

## Detailed Description

Macros by Elektra.

Macros start with ELEKTRA_ and are uppercase.

Copyright
  BSD License (see LICENSE.md or https://www.libelektra.org)

## Macro Definition Documentation

## ◆ ELEKTRA_SET_ERROR_READ_ONLY

#define ELEKTRA_SET_ERROR_READ_ONLY | ( |  | info,
|  |  | returned,
|  |  | error
| ) |  |

Sets error if info != returned.

Parameters

  info | how the info is now (freshly received)
  returned | how the info passed from user is
  error | key to set error to

Returns
  with -1 on error

## ◆ ELEKTRA_SYMVER

#define ELEKTRA_SYMVER | ( |  | sym,
|  |  | impl
| ) |  | sym##_##impl

Helper macro to create a versioned name of a symbol.

Parameters

  sym | unversioned name of the symbol
  impl | version suffix

## ◆ ELEKTRA_SYMVER_DECLARE

#define ELEKTRA_SYMVER_DECLARE | ( |  | ver,
|  |  | sym,
|  |  | impl
| ) |  | ELEKTRA_SYMVER_COMMAND (ELEKTRA_STRINGIFY (ELEKTRA_SYMVER (sym, impl)), #sym "@" ver)

Declares another version of a symbol using the `.symver` assembler pseudo command.

Parameters

  ver | the version name as declared versions.def
  sym | the unversioned name of the symbol
  impl | the version suffix to use for this version