GNOME Bugzilla – Bug 668962
GUnixMountPoint/GUnixMountEntry not usable through gobject-introspection
Last modified: 2017-03-28 16:07:32 UTC
g_unix_mount_at, g_unix_mount_points_get and g_unix_mounts_get are currently not available through gobject-introspection: they have a "(skip)" annotation. Removing this annotation makes calling the functions available, but they return "<void at 0x2552740>" (in pygobject) instead of the desired objects. Asking about this on irc I was asked to file a bug to get GUnixMountPoint (and GUnixMountEntry, presumably) registered as a GBoxed. It would be nice if this could be made to work, or if the documentation could mention them being intentionally unavailable through gobject-introspection-based bindings.
Hi, I confirm. Would be nice to have it in GI. Regards, Étienne
*** Bug 780425 has been marked as a duplicate of this bug. ***
Created attachment 348563 [details] [review] Make GUnixMountEntry and GUnixMountPoint boxed types And unskip some functions using them.
Review of attachment 348563 [details] [review]: ::: gio/gunixmounts.c @@ +1877,3 @@ + * Makes a copy of @mount_entry. + * + * Returns: a new #GUnixMountEntry Needs `(transfer full)` @@ +1881,3 @@ + * Since: 2.54 + */ +GUnixMountEntry* Style: put a space before the `*`. @@ +1889,3 @@ + + copy = g_new0 (GUnixMountEntry, 1); + *copy = *mount_entry; I’d get rid of this assignment and just handle each field individually. @@ +1921,3 @@ + * Makes a copy of @mount_point. + * + * Returns: a new #GUnixMountPoint Missing `(transfer full)` annotation. @@ +1933,3 @@ + + copy = g_new0 (GUnixMountPoint, 1); + *copy = *mount_point; Similarly, I’d get rid of this assignment and handle each field individually.
Created attachment 348591 [details] [review] Make GUnixMountEntry and GUnixMountPoint boxed types Thanks
Created attachment 348599 [details] [review] Make GUnixMountEntry and GUnixMountPoint boxed types Uses the new GLIB_AVAILABLE_IN_2_54 now
Review of attachment 348599 [details] [review]: Looks good, thanks.
Thanks!