GNOME Bugzilla – Bug 635120
Region spans multiple-of-3
Last modified: 2010-11-27 14:16:09 UTC
Created attachment 174725 [details] [review] patch and test cases The croak message in gdk_region_spans_intersect_foreach() refers to GdkPoints, but I think the spans are triples not pairs. The need for triples might be enforced too, ie demand a multiple of 3.
I hit "assertion `spans != NULL'" for the zero test. So we should probably disallow that case, but at least we shouldn't be using it in the test suite.
Oh, I don't know why I missed that spans==NULL. I might have had a skip zero length patch in progress at the same time. If constructing an array it's extremely annoying to have to check if it's non-empty before calling that sort of func, or the draw_points() of the other bug. Much friendlier to quietly do nothing on an empty input. But I'll take that out of the tests to start with.
Created attachment 175208 [details] [review] patch and test cases Without the empty array test case.
Looks great, committed. Thanks.