mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-05 13:19:21 +02:00
gtest: Add more path building API
Add a pair of functions for returning strings that don't need to be freed. This is a bit of a hack but it will turn the 99% case of using these functions from: gchar *tmp; tmp = g_test_build_filename (...); fd = open (tmp, ...); g_free (tmp); to: fd = open (g_test_get_filename (...), ...); which is a pretty substantial win. https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
@@ -382,6 +382,12 @@ GLIB_AVAILABLE_IN_2_38
|
||||
gchar * g_test_build_filename (GTestFileType file_type,
|
||||
const gchar *first_path,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
const gchar *g_test_get_dir (GTestFileType file_type);
|
||||
GLIB_AVAILABLE_IN_2_38
|
||||
const gchar *g_test_get_filename (GTestFileType file_type,
|
||||
const gchar *first_path,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
#define g_test_assert_expected_messages() g_test_assert_expected_messages_internal (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC)
|
||||
|
||||
|
Reference in New Issue
Block a user