NetworkManager/shared/nm-utils
Thomas Haller a1425a4c91 shared: pre-calculate number of tokens in nm_utils_strsplit_set_full()
Instead of growing the buffer for the tokens (and reallocating),
do one pre-run over the string and count the delimiters. This
way we know how much space we need and we don't need to
reallocate.

Interestingly, this is notably slower than the previous implementation,
because previously if would not bother determining the right number of
tokens but just over-allocate with a reasonable guess of 8 and grow the
buffer exponentially. Still, I like this better because while it may
be slower in common scenarios, it allocates the exact number of buffer
space.
2019-04-10 15:05:57 +02:00
..
tests shared: add nm_strstrip_avoid_copy_a() helper 2019-04-04 21:01:15 +02:00
c-list-util.c shared: implement c_list_sort() as non-recursive merge-sort 2018-01-03 16:41:47 +01:00
c-list-util.h shared: add c_list_length_is() helper 2019-03-13 09:03:58 +01:00
nm-c-list.h shared: add nm_c_list_move_*() helpers 2019-02-18 15:00:10 +01:00
nm-compat.c all: avoid g_memdup() 2018-09-07 11:24:17 +02:00
nm-compat.h shared/compat: add compat for nm_setting_vpn_get_data_keys() and nm_setting_vpn_get_secret_keys() 2017-11-23 14:44:25 +01:00
nm-dedup-multi.c all: use nm_c_list_move_*() helpers 2019-02-18 15:00:10 +01:00
nm-dedup-multi.h Fix typos 2018-09-30 21:14:55 +02:00
nm-enum-utils.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-enum-utils.h all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nm-errno.c shared: add nm_strerror_native() to replace strerror() and g_strerror() 2019-02-12 08:50:28 +01:00
nm-errno.h shared: fix nm_errno_from_native() for negative input 2019-02-12 09:13:29 +01:00
nm-glib.h shared/nm-glib: add our own g_steal_pointer() macro to shadow the one from glib 2019-02-21 07:22:36 +01:00
nm-hash-utils.c all: fix misspellings 2019-01-24 17:19:44 +01:00
nm-hash-utils.h shared: add nm_hash_obfuscate_ptr() helper 2019-03-13 09:03:58 +01:00
nm-io-utils.c cli/wireguard: add import functionality for WireGuard 2019-03-07 17:54:25 +01:00
nm-io-utils.h shared: move file-get-contents and file-set-contents helper to shared/ 2018-09-04 07:38:30 +02:00
nm-jansson.h shared: add nm_auto_decref_json 2019-02-17 19:39:07 +01:00
nm-logging-fwd.h logging: make nm-logging thread-safe 2019-02-05 08:18:08 +01:00
nm-macros-internal.h shared: add nm_strstrip_avoid_copy_a() helper 2019-04-04 21:01:15 +02:00
nm-obj.h all: replace "it's" with "its" where needed 2018-04-18 14:14:07 +02:00
nm-random-utils.c Fix typos 2018-09-30 21:14:55 +02:00
nm-random-utils.h shared: split random and hash utils 2017-10-17 20:02:59 +02:00
nm-secret-utils.c shared: better implement compat version of explicit_bzero() 2019-04-02 19:30:33 +02:00
nm-secret-utils.h shared: add nm_utils_memeqzero_secret() 2019-03-07 17:54:25 +01:00
nm-shared-utils.c shared: pre-calculate number of tokens in nm_utils_strsplit_set_full() 2019-04-10 15:05:57 +02:00
nm-shared-utils.h shared: add NM_UTILS_STRSPLIT_SET_FLAGS_PRESERVE_EMPTY flag for nm_utils_strsplit_set_full() 2019-04-10 15:05:57 +02:00
nm-test-utils.h Revert "all: goodbye libnm-glib" 2019-04-03 08:52:38 +02:00
nm-time-utils.c shared: thread safe initialization of nm_utils_get_monotonic_timestamp*() 2018-11-28 16:13:04 +01:00
nm-time-utils.h shared: move nm_utils_get_monotonic_timestamp*() to shared/nm-utils. 2018-10-18 12:16:55 +02:00
nm-udev-utils.c udev: remove unneeded NULL checks 2018-12-12 14:18:53 +01:00
nm-udev-utils.h udev: add and use nm_udev_utils_property_decode() function 2017-03-22 12:41:06 +01:00
nm-vpn-editor-plugin-call.h shared: include "gsystem-local-alloc.h" from "nm-glib.h" 2016-06-16 10:45:54 +02:00
nm-vpn-plugin-macros.h shared: add nm_utils_syslog_coerce_from_nm() util 2016-09-19 15:35:33 +02:00
nm-vpn-plugin-utils.c shared/vpn-plugin-utils: load the editor from the same place as plugin 2018-10-24 15:12:43 +02:00
nm-vpn-plugin-utils.h shared: add "nm-utils/nm-vpn-plugin-utils.h" 2016-06-16 10:45:54 +02:00
unaligned.h systemd: update code from upstream (2018-11-23) 2018-11-23 10:53:12 +01:00