[Github-comments] [geany/geany] Improve goto-symbols popup (#1445)
Colomban Wendling
notifications at xxxxx
Sat Nov 24 18:05:35 UTC 2018
b4n commented on this pull request.
> + * @return @transfer{full} A newly-allocated array of transformed paths strings, terminated by
+ @c NULL. Use @c g_strfreev() to free it.
+ *
+ * @since 1.31 (API 232)
+ */
+GEANY_API_SYMBOL
+gchar **utils_strv_shorten_file_list(gchar **file_names, gssize num)
+{
+ gsize i;
+ gchar *prefix, *substring, *lcs;
+ gchar *start, *end;
+ gchar **names;
+ gsize prefix_len, lcs_len;
+
+ /* We don't dereference file_names if num == 0. */
+ g_return_val_if_fail(num != 0 && file_names == NULL, NULL);
This should be `num == 0 || file_names != NULL`, as it's basically an assertion, and should list conditions expected to pass.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1445#pullrequestreview-178057950
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181124/9a122455/attachment.html>
More information about the Github-comments
mailing list