Defines | |
#define | _DBUS_STRING_MAX_MAX_LENGTH (_DBUS_INT32_MAX - _DBUS_STRING_ALLOCATION_PADDING) |
This is the maximum max length (and thus also the maximum length) of a DBusString. | |
#define | DBUS_GENERIC_STRING_PREAMBLE(real) _dbus_assert ((real) != NULL); _dbus_assert (!(real)->invalid); _dbus_assert ((real)->len >= 0); _dbus_assert ((real)->allocated >= 0); _dbus_assert ((real)->max_length >= 0); _dbus_assert ((real)->len <= ((real)->allocated - _DBUS_STRING_ALLOCATION_PADDING)); _dbus_assert ((real)->len <= (real)->max_length) |
Checks a bunch of assertions about a string object. | |
#define | DBUS_STRING_PREAMBLE(str) |
Checks assertions about a string object that needs to be modifiable - may not be locked or const. | |
#define | DBUS_LOCKED_STRING_PREAMBLE(str) |
Checks assertions about a string object that may be locked but can't be const. | |
#define | DBUS_CONST_STRING_PREAMBLE(str) |
Checks assertions about a string that may be const or locked. | |
Functions | |
dbus_bool_t | _dbus_string_test (void) |
Unit test for DBusString. |
The guts of DBusString.
|
Value: const DBusRealString *real = (DBusRealString*) str; \ DBUS_GENERIC_STRING_PREAMBLE (real) Also declares the "real" variable pointing to DBusRealString.
Definition at line 107 of file dbus-string-private.h. Referenced by _dbus_string_copy_data(), _dbus_string_copy_data_len(), _dbus_string_copy_to_buffer(), _dbus_string_find_blank(), _dbus_string_find_byte_backward(), _dbus_string_find_to(), _dbus_string_get_unichar(), _dbus_string_skip_blank(), _dbus_string_skip_white(), _dbus_string_validate_ascii(), _dbus_string_validate_nul(), and _dbus_string_validate_utf8(). |
|
Checks a bunch of assertions about a string object.
Definition at line 78 of file dbus-string-private.h. Referenced by _dbus_string_ends_with_c_str(), _dbus_string_equal(), _dbus_string_equal_c_str(), _dbus_string_equal_len(), _dbus_string_equal_substring(), _dbus_string_free(), and _dbus_string_starts_with_c_str(). |
|
Value: DBusRealString *real = (DBusRealString*) str; \ DBUS_GENERIC_STRING_PREAMBLE (real); \ _dbus_assert (!(real)->constant) i.e. a string object that we can free. Also declares the "real" variable pointing to DBusRealString.
Definition at line 98 of file dbus-string-private.h. Referenced by _dbus_string_lock(). |
|
|
Unit test for DBusString.
Definition at line 300 of file dbus-string-util.c. References _dbus_assert, _dbus_assert_not_reached, _DBUS_N_ELEMENTS, _dbus_string_append(), _dbus_string_append_byte(), _dbus_string_append_double(), _dbus_string_append_int(), _dbus_string_append_unichar(), _dbus_string_copy(), _dbus_string_equal_c_str(), _dbus_string_equal_substring(), _dbus_string_find(), _dbus_string_find_byte_backward(), _dbus_string_find_to(), _dbus_string_free(), _dbus_string_get_unichar(), _dbus_string_hex_decode(), _dbus_string_init(), _dbus_string_init_const(), _dbus_string_insert_bytes(), _dbus_string_move(), _dbus_string_parse_double(), _dbus_string_parse_int(), _dbus_string_replace_len(), _dbus_string_set_length(), _dbus_string_shorten(), _dbus_string_steal_data(), dbus_free(), NULL, and TRUE. |