GNOME Bugzilla – Bug 643011
More introspection fixes
Last modified: 2011-03-17 12:51:00 UTC
I think it is better to wait for a released Javascript applet before saying "fixed", as I've found another place in need of annotations.
Created attachment 181649 [details] [review] libnm-util: another introspection annotation nm_utils_ssid_to_utf8 has gchar* in the signature, but it accepts an array of bytes, not a string. Fix with the appropriate annotation.
How about we just change the prototype of that function to take a GByteArray? I can't find anywhere in NM or nm-applet that it's used with just a char* and size_t. It's always given the byte array components.
If you have no problems with this new API break, fine for me to make it a GByteArray. In that case, no annotations are needed for the parameter. You still need (transfer full) for the return value.
Just pushed this change actually; does the argument need an annotation at all? I added transfer full to the return value.
Ok, fixed then; we'll keep this open for further introspection fixes.
(In reply to comment #4) > Just pushed this change actually; does the argument need an annotation at all? > I added transfer full to the return value. Ok, perfect. Nothing else needed, for now. I'll tell you as soon as I find something.
Review of attachment 181649 [details] [review]: Changed the API; patch no longer needed. We'll just mark as committed anyway though.
Lets close this bug then ? (just so the ones blocked on this get updated...)
Reopening because I need more fixes...
Created attachment 183462 [details] [review] include: mark flags as such If the /*< flags >*/ annotation is missing, enums are picked as enumerations, so bindings won't allow passing combinations of them.
Flags fixes pushed as 86e3d935a23e8c2f48fd0218265a96b36c5bdcb1
New API, new fixes... (Next time, please check all warnings from introspection compilation)
Created attachment 183542 [details] [review] Add annotations for new API The new setting getters need (transfer none), or they're skipped. The device paramter to nm_client_activate_connection can now be NULL.
Oddly, I don't get any errors that I haven't seen before. This is all I get without having applied the patch: g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC --silent gcc -o /home/dcbw/Development/fdo/NetworkManager/libnm-glib/tmp-introspectKkpHxr/NMClient-1.0 -export-dynamic -L. libnm-glib.la -pthread -L/lib64 -lgio-2.0 -lgmodule-2.0 -ldbus-glib-1 -ldbus-1 -lpthread -lgudev-1.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 /home/dcbw/Development/fdo/NetworkManager/libnm-glib/tmp-introspectKkpHxr/NMClient-1.0.o nm-ip4-config.h:65: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_ip4_config_new' constructed='NMClient.IP4Config' return='GObject.Object' nm-dhcp4-config.h:60: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_dhcp4_config_new' constructed='NMClient.DHCP4Config' return='GObject.Object' nm-ip6-config.h:64: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_ip6_config_new' constructed='NMClient.IP6Config' return='GObject.Object' nm-dhcp6-config.h:60: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_dhcp6_config_new' constructed='NMClient.DHCP6Config' return='GObject.Object' nm-device.h:90: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_device_new' constructed='NMClient.Device' return='GObject.Object' nm-active-connection.h:67: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_active_connection_new' constructed='NMClient.ActiveConnection' return='GObject.Object' nm-device-ethernet.h:61: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_device_ethernet_new' constructed='NMClient.DeviceEthernet' return='GObject.Object' nm-access-point.h:73: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_access_point_new' constructed='NMClient.AccessPoint' return='GObject.Object' nm-device-wifi.h:68: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_device_wifi_new' constructed='NMClient.DeviceWifi' return='GObject.Object' nm-device-bt.h:61: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_device_bt_new' constructed='NMClient.DeviceBt' return='GObject.Object' nm-vpn-connection.h:68: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_vpn_connection_new' constructed='NMClient.VPNConnection' return='GObject.Object' nm-wimax-nsp.h:70: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_wimax_nsp_new' constructed='NMClient.WimaxNsp' return='GObject.Object' nm-device-wimax.h:61: Warning: NMClient: Return value is not superclass for constructor; symbol='nm_device_wimax_new' constructed='NMClient.DeviceWimax' return='GObject.Object' nm-remote-settings.h:62: Warning: NMClient: nm_remote_settings_error_quark: Couldn't find corresponding enumeration nm-secret-agent.h:31: Warning: NMClient: nm_secret_agent_error_quark: Couldn't find corresponding enumeration /usr/bin/g-ir-compiler --includedir=../libnm-util --includedir=. NMClient-1.0.gir -o NMClient-1.0.typelib make[2]: Leaving directory `/home/dcbw/Development/fdo/NetworkManager/libnm-glib' Is there some warning flag we're missing in the Makefiles? I'm using gobject-introspection 0.10.4.
Pushed as 4480365db704d033f28ec5fbd03507d34bf292d1
(In reply to comment #14) > Oddly, I don't get any errors that I haven't seen before. This is all I get > without having applied the patch: > > g-ir-scanner: link: /bin/sh ../libtool --mode=link --tag=CC --silent gcc -o > /home/dcbw/Development/fdo/NetworkManager/libnm-glib/tmp-introspectKkpHxr/NMClient-1.0 > -export-dynamic -L. libnm-glib.la -pthread -L/lib64 -lgio-2.0 -lgmodule-2.0 > -ldbus-glib-1 -ldbus-1 -lpthread -lgudev-1.0 -lgobject-2.0 -lgthread-2.0 -lrt > -lglib-2.0 > /home/dcbw/Development/fdo/NetworkManager/libnm-glib/tmp-introspectKkpHxr/NMClient-1.0.o > nm-ip4-config.h:65: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_ip4_config_new' constructed='NMClient.IP4Config' > return='GObject.Object' > nm-dhcp4-config.h:60: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_dhcp4_config_new' constructed='NMClient.DHCP4Config' > return='GObject.Object' > nm-ip6-config.h:64: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_ip6_config_new' constructed='NMClient.IP6Config' > return='GObject.Object' > nm-dhcp6-config.h:60: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_dhcp6_config_new' constructed='NMClient.DHCP6Config' > return='GObject.Object' > nm-device.h:90: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_device_new' constructed='NMClient.Device' > return='GObject.Object' > nm-active-connection.h:67: Warning: NMClient: Return value is not superclass > for constructor; symbol='nm_active_connection_new' > constructed='NMClient.ActiveConnection' return='GObject.Object' > nm-device-ethernet.h:61: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_device_ethernet_new' > constructed='NMClient.DeviceEthernet' return='GObject.Object' > nm-access-point.h:73: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_access_point_new' constructed='NMClient.AccessPoint' > return='GObject.Object' > nm-device-wifi.h:68: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_device_wifi_new' constructed='NMClient.DeviceWifi' > return='GObject.Object' > nm-device-bt.h:61: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_device_bt_new' constructed='NMClient.DeviceBt' > return='GObject.Object' > nm-vpn-connection.h:68: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_vpn_connection_new' > constructed='NMClient.VPNConnection' return='GObject.Object' > nm-wimax-nsp.h:70: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_wimax_nsp_new' constructed='NMClient.WimaxNsp' > return='GObject.Object' > nm-device-wimax.h:61: Warning: NMClient: Return value is not superclass for > constructor; symbol='nm_device_wimax_new' constructed='NMClient.DeviceWimax' > return='GObject.Object' > nm-remote-settings.h:62: Warning: NMClient: nm_remote_settings_error_quark: > Couldn't find corresponding enumeration > nm-secret-agent.h:31: Warning: NMClient: nm_secret_agent_error_quark: Couldn't > find corresponding enumeration > /usr/bin/g-ir-compiler --includedir=../libnm-util --includedir=. > NMClient-1.0.gir -o NMClient-1.0.typelib > make[2]: Leaving directory > `/home/dcbw/Development/fdo/NetworkManager/libnm-glib' > > Is there some warning flag we're missing in the Makefiles? I'm using > gobject-introspection 0.10.4. Those are bugs in gobject-introspection (bug 637026 for the constructors, bug 637025 for the enums).