Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gobject-introspection gobject-introspection
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 232
    • Issues 232
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • 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
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gobject-introspectiongobject-introspection
  • Merge requests
  • !168

Fix inconsistencies when handling closure and destroy annotations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Corentin Noël requested to merge tintou/closure-destroy-fix into main Jul 31, 2019
  • Overview 4
  • Commits 3
  • Pipelines 4
  • Changes 3

This fixes the inconsistencies in the resulting annotations:

/**
 * tiny_test_object_foreach0:
 * @self: a #TinyTestObject
 * @callback: (scope call):
 * @user_data:
 */
void tiny_test_object_foreach0 (TinyTestObject           *self,
                                TinyTestObjectForeachFunc callback,
                                gpointer                  user_data);

resulted in callback having a closure=1 and user_data having nothing

when this:

/**
 * tiny_test_object_foreach1:
 * @self: a #TinyTestObject
 * @callback1: (scope call):
 * @user_data1: (closure callback1):
 */
void tiny_test_object_foreach1 (TinyTestObject           *self,
                                TinyTestObjectForeachFunc callback1,
                                gpointer                  user_data1);

resulted in user_data1 having a closure=0 and callback1 having nothing

The closure=X parameter is now properly added to the function pointer in all cases (as the first example is the most common use case)

The same mechanism is used for the destroy annotation

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: tintou/closure-destroy-fix