[cairo] looking for critic/advice

First Last begre1929 at yahoo.com
Thu May 23 07:13:22 PDT 2013


Hi Peter,

> I think you need to read up C basics on pointers to structures and their
> components. When you write |(* _mc).s| then that's not a cast but a
> access to the component of the struct. But because that reads weird and
> is used very often, C has the -> operator for this, so write |_mc->s|
> instead. (You should usually also ensure that _mc is valid before
> dereferencing it like this.)
Why I find it strange that it's because I never used something like(* _mc).s before, I know ->and I use it but I didn't thought about it when I wrote this piece of code...

...and sorry about the word "cast" I thought that's the word to say "dereferencing" in english... (Our president want to reinforce the learning of english at university, I guess he should...)

>(You should usually also ensure that _mc is valid before
>dereferencing it like this.)
Yes, I take care of that.

>But I guess all this is pretty off-topic for this list.
thanks for that critic

thx for all Peter,
-Nicoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130523/def22602/attachment.html>


More information about the cairo mailing list