Commit graph

4 commits

Author SHA1 Message Date
Simon McVittie
e159f1f406 sysdeps: Remove _dbus_string_append_int()
It's a wrapper around snprintf(), so we are not gaining any efficiency
versus _dbus_string_append_printf(), and might as well use the more
general function instead. Doing it this way might even be a little *more*
efficient, since it reduces reallocations; it's certainly more concise.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-05-18 12:19:16 +00:00
Ralf Habacker
2dee523608 Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license
The full license texts are not added because they were already
added in a previous commit.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>

see #394
2023-01-04 07:53:44 +00:00
Ralf Habacker
21a6441f33 _dbus_string_test(): Fix fatal build error caused by "-Wstrict-aliasing"
To fix this problem, the problematic code was replaced by a new function
_dbus_string_get_allocated_size(), which uses the existing macro
DBUS_CONST_STRING_PREAMBLE for these purposes.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Part-of: https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/275
Reviewed-by: Simon McVittie <smcv@collabora.com>
2022-04-21 13:55:38 +01:00
Simon McVittie
b1cfd892fc test: Move string tests (most of dbus-string-util.c) here
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-01-21 15:21:43 +00:00