gtest: Add more path building API
authorRyan Lortie <desrt@desrt.ca>
Tue, 28 May 2013 17:22:59 +0000 (13:22 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 29 May 2013 13:03:32 +0000 (09:03 -0400)
commit575a9da718e8c84da052f50f1435914a94197696
tree28e99bbbbfbcdae9a846d96544d4bc19989b7580
parent58c6ca32aac6e0735d7325ce0b876025c722bae3
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
docs/reference/glib/glib-sections.txt
glib/gtestutils.c
glib/gtestutils.h