D-Bus 1.13.18

Macros
DBusString implementation details
D-Bus secret internal implementation details

DBusString implementation details. More...

## Macros
#define | _DBUS_STRING_MAX_LENGTH (_DBUS_INT32_MAX - _DBUS_STRING_ALLOCATION_PADDING)
| The maximum length of a DBusString. More...
#define | DBUS_GENERIC_STRING_PREAMBLE(real)
| Checks a bunch of assertions about a string object. More...
#define | DBUS_STRING_PREAMBLE(str)
| Checks assertions about a string object that needs to be modifiable - may not be locked or const. More...
#define | DBUS_LOCKED_STRING_PREAMBLE(str)
| Checks assertions about a string object that may be locked but can't be const. More...
#define | DBUS_CONST_STRING_PREAMBLE(str)
| Checks assertions about a string that may be const or locked. More...
#define | DBUS_IS_ASCII_BLANK(c) ((c) == ' ' || (c) == '\t')
| Checks for ASCII blank byte. More...
#define | DBUS_IS_ASCII_WHITE(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r')
| Checks for ASCII whitespace byte. More...

## Detailed Description

DBusString implementation details.

The guts of DBusString.

## Macro Definition Documentation

## ◆ _DBUS_STRING_MAX_LENGTH

#define _DBUS_STRING_MAX_LENGTH (_DBUS_INT32_MAX - _DBUS_STRING_ALLOCATION_PADDING)

The maximum length of a DBusString.

Definition at line 69 of file dbus-string-private.h.

## ◆ DBUS_CONST_STRING_PREAMBLE

#define DBUS_CONST_STRING_PREAMBLE | ( |  | str | ) |

Value:
const DBusRealString *real = (DBusRealString*) str; \
DBUS_GENERIC_STRING_PREAMBLE (real)
DBusRealString
Internals of DBusString.
Definition: dbus-string-private.h:44

Checks assertions about a string that may be const or locked.

Also declares the "real" variable pointing to DBusRealString.

Parameters

  str | the string.

Definition at line 114 of file dbus-string-private.h.

## ◆ DBUS_GENERIC_STRING_PREAMBLE

#define DBUS_GENERIC_STRING_PREAMBLE | ( |  | real | ) |

Value:
do { \
(void) real; /* might be unused unless asserting */ \
_dbus_assert ((real) != NULL); \
_dbus_assert ((real)->valid); \
_dbus_assert ((real)->len >= 0); \
_dbus_assert ((real)->allocated >= 0); \
_dbus_assert ((real)->len <= ((real)->allocated - _DBUS_STRING_ALLOCATION_PADDING)); \
_dbus_assert ((real)->len <= _DBUS_STRING_MAX_LENGTH); \
} while (0)
NULL
#define NULL
A null pointer, defined appropriately for C or C++.
_DBUS_STRING_MAX_LENGTH
#define _DBUS_STRING_MAX_LENGTH
The maximum length of a DBusString.
Definition: dbus-string-private.h:69

Checks a bunch of assertions about a string object.

Parameters

  real | the DBusRealString

Definition at line 76 of file dbus-string-private.h.

## ◆ DBUS_IS_ASCII_BLANK

#define DBUS_IS_ASCII_BLANK | ( |  | c | ) | ((c) == ' ' || (c) == '\t')

Checks for ASCII blank byte.

Parameters

  c | the byte

Definition at line 121 of file dbus-string-private.h.

## ◆ DBUS_IS_ASCII_WHITE

#define DBUS_IS_ASCII_WHITE | ( |  | c | ) | ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r')

Checks for ASCII whitespace byte.

Parameters

  c | the byte

Definition at line 127 of file dbus-string-private.h.

## ◆ DBUS_LOCKED_STRING_PREAMBLE

#define DBUS_LOCKED_STRING_PREAMBLE | ( |  | str | ) |

Value:
DBusRealString *real = (DBusRealString*) str; \
DBUS_GENERIC_STRING_PREAMBLE (real); \
_dbus_assert (!(real)->constant)

Checks assertions about a string object that may be locked but can't be const.

i.e. a string object that we can free. Also declares the "real" variable pointing to DBusRealString.

Parameters

  str | the string

Definition at line 105 of file dbus-string-private.h.

## ◆ DBUS_STRING_PREAMBLE

#define DBUS_STRING_PREAMBLE | ( |  | str | ) |

Value:
DBusRealString *real = (DBusRealString*) str; \
DBUS_GENERIC_STRING_PREAMBLE (real); \
_dbus_assert (!(real)->constant); \
_dbus_assert (!(real)->locked)

Checks assertions about a string object that needs to be modifiable - may not be locked or const.

Also declares the "real" variable pointing to DBusRealString.

Parameters

  str | the string

Definition at line 93 of file dbus-string-private.h.