[Github-comments] [geany/geany] build.c: Remove g_ptr_array_foreach with gpointer user_data & update HACKING (#2270)

Nick Treleaven notifications at xxxxx
Sat Aug 24 08:21:50 UTC 2019


ntrel commented on this pull request.



> @@ -219,6 +219,10 @@ Coding
   ``gint``, use a ``gchar`` for individual (ASCII/UTF-8) string
   characters rather than ``gint``, and use a ``guint`` for integers
   which cannot be negative rather than ``gint``.
+* Avoid using untyped pointers (e.g. gpointer) where practical.
+* Prefer loops to calling *_foreach() with a non-NULL untyped 
+  ``user_data`` pointer parameter, unless external iteration is not 
+  supported (e.g. for tree structures).

I've changed it to just "calling ``some_type_foreach()`` with a ``user_data`` argument". I think the last part implies that a NULL argument is OK. I agree that loops are generally better than *_foreach functions, but there are some cases where they're fine.

-- 
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/2270#discussion_r317350085
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190824/6b188101/attachment-0001.html>


More information about the Github-comments mailing list