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 666699 - Nullability fixes for GLib and GIO VAPIs
Nullability fixes for GLib and GIO VAPIs
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GLib
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-22 00:09 UTC by Philip Withnall
Modified: 2011-12-23 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Nullability fixes for GLib and GIO VAPIs (4.21 KB, patch)
2011-12-22 00:12 UTC, Philip Withnall
needs-work Details | Review
Nullability fixes for GLib and GIO VAPIs (updated) (7.58 KB, patch)
2011-12-23 12:22 UTC, Philip Withnall
none Details | Review

Description Philip Withnall 2011-12-22 00:09:42 UTC
Patch coming up with a couple of nullability fixes.
Comment 1 Philip Withnall 2011-12-22 00:12:14 UTC
Created attachment 204067 [details] [review]
Nullability fixes for GLib and GIO VAPIs
Comment 2 Luca Bruno 2011-12-22 10:44:55 UTC
Review of attachment 204067 [details] [review]:

The patch is not directly applicable because gio-2.0.vapi is autogenerated.
Comment 3 Philip Withnall 2011-12-23 12:22:48 UTC
Created attachment 204135 [details] [review]
Nullability fixes for GLib and GIO VAPIs (updated)

Whoops, sorry. This one modifies the GIO packages/* files as well.
Comment 4 Luca Bruno 2011-12-23 16:49:50 UTC
(In reply to comment #3)
> Created an attachment (id=204135) [details] [review]
> Nullability fixes for GLib and GIO VAPIs (updated)
> 
> Whoops, sorry. This one modifies the GIO packages/* files as well.

commit b2b17a15566d744956ddfdabc656e751650cf9bc
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Thu Dec 22 00:10:18 2011 +0000

    glib-2.0, gio-2.0: Fix some nullable types in ContentType, Icon, HashTable
    
    Fixes bug 666699.

Thanks for the updated patch. However it wasn't possible to regenerate the vapi:

../vapigen/vapigen --vapidir . --library ./gio-2.0 ./packages/gio-2.0/gio-2.0-custom.vala ./packages/gio-2.0/gio-2.0.gi
gio-2.0.gi:0.0-0.0: error: `GLib' already contains a definition for `g_content_type_get_mime_type'
gio-2.0-custom.vala:96.2-96.51: note: previous definition of `g_content_type_get_mime_type' was here
	public static string? g_content_type_get_mime_type (string type);
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Generation failed: 1 error(s), 0 warning(s)

The problem comes from the metadata: g_content_type_get_mime_type nullable="1"

The right row was: g_content_type_get_mime_type parent="ContentType" transfer_ownership="1" nullable="1"