Bug 95065 - polkit: Add g_autoptr() support for GObject-derived polkit types
Summary: polkit: Add g_autoptr() support for GObject-derived polkit types
Status: RESOLVED FIXED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: libpolkit (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 11:36 UTC by Philip Withnall
Modified: 2016-05-09 06:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
polkit: Add g_autoptr() support for GObject-derived polkit types (2.01 KB, patch)
2016-04-22 11:36 UTC, Philip Withnall
Details | Splinter Review

Description Philip Withnall 2016-04-22 11:36:01 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2016-04-22 11:36:02 UTC
Created attachment 123147 [details] [review]
polkit: Add g_autoptr() support for GObject-derived polkit types

Add G_DEFINE_AUTOPTR_CLEANUP_FUNC calls to polkittypes.h, so that
g_autoptr() can be used with polkit objects.

This is conditional on GLib ≥ 2.44.0 being available. It does not bump
polkit’s dependency on GLib.
Comment 2 Colin Walters 2016-04-25 21:53:29 UTC
Comment on attachment 123147 [details] [review]
polkit: Add g_autoptr() support for GObject-derived polkit types

Review of attachment 123147 [details] [review]:
-----------------------------------------------------------------

Are other projects doing things like this?  It seems okay, I can see potential maintenance pain as types are added, but in the case of polkit that's very unlikely now.

Basically LGTM
Comment 3 Philip Withnall 2016-05-04 15:31:10 UTC
(In reply to Colin Walters from comment #2)
> Comment on attachment 123147 [details] [review] [review]
> polkit: Add g_autoptr() support for GObject-derived polkit types
> 
> Review of attachment 123147 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Are other projects doing things like this?  It seems okay, I can see
> potential maintenance pain as types are added, but in the case of polkit
> that's very unlikely now.
> 
> Basically LGTM

I don’t have permission to push this; can you do so please?
Comment 5 Colin Walters 2016-05-07 18:21:40 UTC
Looks like this broke at least xdg-app:

http://build.gnome.org/continuous/buildmaster/builds/2016/05/07/6/build/log-xdg-app.txt

Which given https://bugzilla.gnome.org/show_bug.cgi?id=763379 is probably xdg-app's fault.

Just noting here.
Comment 6 Alexander Larsson 2016-05-09 06:42:23 UTC
Commited a fix to xdg-app.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.