diff options
author | Philip Withnall <withnall@endlessm.com> | 2018-11-30 11:04:09 +0000 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2018-12-17 17:16:03 +0000 |
commit | e6eb4869ba2354484478834d5af86fc91c7bc107 (patch) | |
tree | ff4915ee04513c9255c7ce0a5f42134e5dc703e0 /glib.supp | |
parent | a67eadbdc3d8a317c41cfb011d88de41b271194f (diff) | |
download | glib-e6eb4869ba2354484478834d5af86fc91c7bc107.tar.gz |
gutils: Refactor initialisation of XDG variables
Split out the code which calculates each XDG variable value from the
code which caches it, so that GLib can internally recalculate the
variables if needed, without necessarily trashing the user-visible
cache.
This will be useful in a following commit to add support for explicitly
reloading the variables.
This commit necessarily reworks how g_get_user_runtime_dir() is
structured, since it was inexplicably structured differently from (but
equivalently to) the other XDG variable functions.
Future refactoring could easily share a lot more code between these
g_build_*() functions.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/glib/issues/538
Diffstat (limited to 'glib.supp')
-rw-r--r-- | glib.supp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -543,3 +543,23 @@ ... fun:g_object_new_valist } + +# g_get_system_data_dirs() caches a one-time allocation +{ + g_get_system_data_dirs + Memcheck:Leak + fun:malloc + ... + fun:g_build_system_data_dirs + fun:g_get_system_data_dirs +} + +# g_get_user_data_dir() caches a one-time allocation +{ + g_get_user_data_dir + Memcheck:Leak + fun:realloc + ... + fun:g_build_user_data_dir + fun:g_get_user_data_dir +}
\ No newline at end of file |