Skip to content

Improve GPtrArray doc-comments

Simon McVittie requested to merge wip/array-doc-comments into master
  • array: Remove unnecessary casts from doc-comments

    Let's not encourage library users to sprinkle casts through their code when they don't need to.

  • array: Fix handling of user_data in doc-comment

    The user_data for g_ptr_array_sort_with_data is passed directly, not with an extra layer of pointer like the data pointers.

  • array: Add tests based on the g_ptr_array_sort[_with_data] doc-comments

    Note that I deliberately haven't used g_autoptr here, because while we encourage GLib users to use g_autoptr in their own code, GLib itself still supports being compiled in environments like MSVC that can't support g_autoptr.


This fixes some bugs I noticed in the example code added by !1024 (closed).

Merge request reports