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 672612 - allow-none attribute for properties
allow-none attribute for properties
Status: RESOLVED DUPLICATE of bug 660879
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 669640
 
 
Reported: 2012-03-22 09:02 UTC by jessevdk@gmail.com
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jessevdk@gmail.com 2012-03-22 09:02:23 UTC
I was wondering if it makes sense for gobject-introspection to have allow-none annotations for properties. I personally ran into the problem while using GIR with vala that properties cannot be annotated with allow-none. Vala allows for specifying whether or not a return value (also of a property) can be null (using ? after the type). This means that currently creating a GIR from some vala classes and then trying to use that GIR again in vala will fail in unexpected ways. A particular example of this is when trying to implement an interface which was exported in the GIR.
Comment 1 jessevdk@gmail.com 2012-07-08 10:01:23 UTC
Ping?
Comment 2 Colin Walters 2012-07-08 19:15:00 UTC
Basically (allow-none) is a subset of vala's nullable types.  See also bug 626395 

I am against just adding more (allow-none) to mean (nullable) without having a full plan for what it means in all of the cases.  In particular how it interacts with (out) and (inout), and how we would handle the fact that the default assumption for return values is that they may be null, so we'd actually want (not-null) or something.
Comment 3 jessevdk@gmail.com 2012-07-09 06:47:20 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 660879 ***
Comment 4 André Klapper 2015-02-07 16:49:21 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]