[cairo] make return buffers more obvious

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Fri Dec 18 12:23:13 PST 2015

On 18.12.2015 20:43, Bill Spitzak wrote:

> I doubt it, but I could not understand why const is not being used or
> why the original poster asked this question.

That's only part of my point. I'd like to know (from the function
prototype / naming convention / inline-description) which parameters
are accessed in which way (eg. changed).

We can't use const everywhere for that. For example, we're filling
some structure with pointers to other objects. Further suppose that
structure has non-const poiners, because somewhere, somewhen, we'd
like to change the object our passed pointer points to (but not in
that function itself).

const simply can't express that (actually, I dont know any language
that can do that), so we'd need another way of describing this.

And there're other aspects, eg. whether some structs need some
cleanups (destructors), not-null constraints, etc, etc.


Enrico Weigelt,
metux IT consulting

More information about the cairo mailing list