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 622774 - gdk_draw_lines() and gdk_draw_points() allow npoints==0
gdk_draw_lines() and gdk_draw_points() allow npoints==0
Status: RESOLVED FIXED
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-06-25 23:54 UTC by Kevin Ryde
Modified: 2010-12-12 13:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.93 KB, patch)
2010-06-25 23:54 UTC, Kevin Ryde
none Details | Review
patch and test cases (3.33 KB, patch)
2010-11-27 23:42 UTC, Kevin Ryde
committed Details | Review

Description Kevin Ryde 2010-06-25 23:54:02 UTC
Created attachment 164660 [details] [review]
patch

I believe gdk_draw_lines() and gdk_draw_points() allow npoints==0, and doing nothing on no points it handy if constructing the args from a map or an array.
Comment 1 Torsten Schoenfeld 2010-11-23 21:49:11 UTC
Looks good to me in general, only one small problem: G_LIKELY wasn't available in glib 2.0.  So, can you wrap it in version guards or maybe just remove it?
Comment 2 Kevin Ryde 2010-11-27 23:42:06 UTC
Created attachment 175392 [details] [review]
patch and test cases

Ah, G_LIKELY, yep.  Tempting to drop it, but I think I like it well enough to just have a fallback.  I suppose a fallback could go in gperl-private.h or something if it was to be sprayed around a lot of places.
Comment 3 Torsten Schoenfeld 2010-12-12 13:47:32 UTC
Thanks.