mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-13 11:23:09 +03:00

...to free or not to free the string representation of vfs_path_t object. It allows to get rid of string duplication in following cases: vfs_path_t *vpath; char *path; ... vpath = vfs_path_from_str (...); path = g_strdup (vfs_path_as_str (vpath)); vfs_path_free (vpath); Now we can write: vfs_path_t *vpath; char *path; ... vpath = vfs_path_from_str (...); path = vfs_path_free (vpath, FALSE); Signed-off-by: Andrew Borodin <aborodin@vmail.ru>