After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668962 - GUnixMountPoint/GUnixMountEntry not usable through gobject-introspection
GUnixMountPoint/GUnixMountEntry not usable through gobject-introspection
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
: 780425 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-29 17:29 UTC by Marien Zwart
Modified: 2017-03-28 16:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make GUnixMountEntry and GUnixMountPoint boxed types (7.05 KB, patch)
2017-03-23 11:50 UTC, Christoph Reiter (lazka)
none Details | Review
Make GUnixMountEntry and GUnixMountPoint boxed types (7.30 KB, patch)
2017-03-23 17:36 UTC, Christoph Reiter (lazka)
none Details | Review
Make GUnixMountEntry and GUnixMountPoint boxed types (7.18 KB, patch)
2017-03-23 18:44 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Marien Zwart 2012-01-29 17:29:50 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.
Comment 1 Étienne Bersac 2012-09-07 12:24:07 UTC
Hi,

I confirm. Would be nice to have it in GI.

Regards,
Étienne
Comment 2 Christoph Reiter (lazka) 2017-03-23 08:50:23 UTC
*** Bug 780425 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Reiter (lazka) 2017-03-23 11:50:40 UTC
Created attachment 348563 [details] [review]
Make GUnixMountEntry and GUnixMountPoint boxed types

And unskip some functions using them.
Comment 4 Philip Withnall 2017-03-23 15:49:58 UTC
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.
Comment 5 Christoph Reiter (lazka) 2017-03-23 17:36:03 UTC
Created attachment 348591 [details] [review]
Make GUnixMountEntry and GUnixMountPoint boxed types

Thanks
Comment 6 Christoph Reiter (lazka) 2017-03-23 18:44:59 UTC
Created attachment 348599 [details] [review]
Make GUnixMountEntry and GUnixMountPoint boxed types

Uses the new GLIB_AVAILABLE_IN_2_54 now
Comment 7 Philip Withnall 2017-03-28 11:21:38 UTC
Review of attachment 348599 [details] [review]:

Looks good, thanks.
Comment 8 Christoph Reiter (lazka) 2017-03-28 16:07:32 UTC
Thanks!