Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G grilo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 78
    • Issues 78
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • grilo
  • Merge requests
  • !10

add G_DEFINE_AUTOPTR_CLEANUP_FUNC to support g_autoptr

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Leesoo Ahn requested to merge memnoth/grilo:master into master Jul 05, 2018
  • Overview 15
  • Commits 8
  • Changes 9

g_autoptr is available automatically if those structures, GrlMedia, GrlOperationOptions (in this case) are declared with G_DECLARE_* macros. However, for some reasons (GRL_PADDING, or breaking ABI), it is kind of dangerous that they are migrated to G_DECLARE_* without any knowledge. Instead, G_DEFINE_AUTOPTR_CLEANUP_FUNC is added to support g_autoptr.

The commits are not only related to those TODOs, https://gitlab.gnome.org/GNOME/gnome-photos/blob/master/src/photos-flickr-item.c#L150, and gnome-photos#77, but also to support it for newly-written applications.

TODO

  • Implement test cases for g_autoptr.
  • Add the cleanup macro to other classes.
Edited Jul 12, 2018 by Leesoo Ahn
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master