GNOME Bugzilla – Bug 682125
Properly annotate gdk_rgba_parse
Last modified: 2016-02-02 15:11:56 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.
Created attachment 221678 [details] [review] Properly annotate gdk_rgba_parse It's first argument is an out-argument, just like gdk_color_parse's.
The patch in bug 682124 has now been committed.
Ping.
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.
(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.
*** Bug 754990 has been marked as a duplicate of this bug. ***