Re: looking for critic/advice

First Last <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.