[cairo] Parameter types of image_surface API

Bryce Harrington bryce at osg.samsung.com
Wed Jul 30 16:51:14 PDT 2014

On Wed, Jul 30, 2014 at 11:30:32AM +0200, David Weiß wrote:
> Hey,
> I'm wondering whether there's any reason for the image_surface API to use signed datatypes for width/height parameters?
> I think unsigned int makes more sense.
> Also, none of the parameters is defined as const. E.g. and especially for getters like cairo_image_surface_get_width() it's IMHO better style (and semantics) to pass const cairo_surface_t * const instead of just cairo_surface_t *.
> Is there a technical reason not to do so?

Good questions.  Might be merely historical reasons + need for backwards
compatibility, but I don't actually know.  Carl would probably be the
one to ask.


More information about the cairo mailing list