GNOME Bugzilla – Bug 646417
g_dbus_node_info_lookup_interface(info, NULL) could return the only (or first) interface
Last modified: 2018-05-24 13:00:40 UTC
It would be convenient if g_dbus_node_info_lookup_interface() could return the first, or only, interface that it finds, to slightly simplify code that only registers one interface.
You mean that lookup_interface() should accept a NULL name and return the first interface it finds in that case? I don't like that since you can just as easily do iface = node->interfaces != NULL ? node->interfaces[0] : NULL;
Well, it seems like the function is meant to be a convenience, so it could be even more convenient. But I didn't actually realized that you mean for the bare struct members to be public API so I'll just improve this method in the C++ API instead if you object to doing it in the C API's function.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/400.