[nautilus/1841-crashing-when-copying-folder-with-same-name-and-click-to-rename: 2/2] eel-vfs-extensions: Document get_extension_offset




commit e9e026df886937d183889520f6414eeea978bc29
Author: António Fernandes <antoniof gnome org>
Date:   Thu Apr 29 16:53:32 2021 +0100

    eel-vfs-extensions: Document get_extension_offset
    
    Mostly to remember callers must be ready to handle a NULL return value,
    trying to prevent more bugs like the one fixed by the previous commit.

 eel/eel-vfs-extensions.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/eel/eel-vfs-extensions.c b/eel/eel-vfs-extensions.c
index afdf0621a..ea9ef2b3e 100644
--- a/eel/eel-vfs-extensions.c
+++ b/eel/eel-vfs-extensions.c
@@ -107,6 +107,15 @@ eel_uri_is_in_xdg_dirs (const gchar *uri)
     return has_prefix;
 }
 
+/**
+ * eel_filename_get_extension_offset:
+ * @filename: a null-terminated string representing the basename of a file, with
+ *            or without extension.
+ *
+ * Returns: (nullable) (transfer none): A pointer to the substring containing
+ *                                      the dot and extension, or %NULL if there
+ *                                      is no extension.
+ */
 char *
 eel_filename_get_extension_offset (const char *filename)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]