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 682125 - Properly annotate gdk_rgba_parse
Properly annotate gdk_rgba_parse
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 754990 (view as bug list)
Depends on: 682124
Blocks:
 
 
Reported: 2012-08-17 22:35 UTC by Torsten Schoenfeld
Modified: 2016-02-02 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Properly annotate gdk_rgba_parse (842 bytes, patch)
2012-08-17 22:35 UTC, Torsten Schoenfeld
reviewed Details | Review

Description Torsten Schoenfeld 2012-08-17 22:35:34 UTC
This changes the calling semantics from

  // construct an Gdk.RGBA instance rgba somehow
  rgba.parse (...)
  // now rgba contains the new information

to

  // now prior instance necessary
  rgba = Gdk.RGBA.parse (...)

This brings it in line with gdk_color_parse.

Note:
* it is conceivable that this breaks existing code;
* for this patch to have any effect, bug 682124 in gobject-introspection needs
  to be resolved first.
Comment 1 Torsten Schoenfeld 2012-08-17 22:35:40 UTC
Created attachment 221678 [details] [review]
Properly annotate gdk_rgba_parse

It's first argument is an out-argument, just like gdk_color_parse's.
Comment 2 Torsten Schoenfeld 2012-08-21 18:55:38 UTC
The patch in bug 682124 has now been committed.
Comment 3 Torsten Schoenfeld 2013-01-23 23:36:24 UTC
Ping.
Comment 4 Colin Walters 2013-01-25 19:45:48 UTC
Review of attachment 221678 [details] [review]:

The change is right, except it's an IABI break.  Code which was previously doing:

var color = new Gdk.RGBA();
color.parse("red");

will now start failing since it will need to be Gdk.RGBA.parse("red");

In theory bindings could detect this, it's just messy.

gdk_color_parse() is also slightly different in that the GdkColor is the *second* argument, which is right if you think of it as an output argument.

So...I dunno.  If not many people are calling it, maybe we just go with the change.
Comment 5 Torsten Schoenfeld 2013-01-26 19:50:17 UTC
(In reply to comment #4)
> The change is right, except it's an IABI break.

Yes.  And I'm perfectly fine with getting this patch rejected on these grounds.  I just wanted to induce a decision.

If we do reject this patch, I think we should add a comment explaining that we purposefully not add the missing annotation to preserve IABI.
Comment 6 Emmanuele Bassi (:ebassi) 2016-02-02 15:11:56 UTC
*** Bug 754990 has been marked as a duplicate of this bug. ***