Add warning about reusing string buffer in utils_build_path().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3995 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-07-20 11:21:05 +00:00
parent 8eef880bb6
commit 7bb6a8c32d

View File

@ -1602,7 +1602,9 @@ gboolean utils_spawn_async(const gchar *dir, gchar **argv, gchar **env, GSpawnFl
/* Similar to g_build_path() but (re)using a fixed buffer, so never free it.
* This assumes a small enough resulting string length to be kept without freeing,
* but this should be the case for filenames. */
* but this should be the case for filenames.
* @warning As the buffer is reused, you can't call this recursively, e.g. for a
* function argument and within the function called. */
const gchar *utils_build_path(const gchar *first, ...)
{
static GString *buffer = NULL;