Re: looking for critic/advice
Peter Weilbacher <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 22 May 2013, First Last wrote: > For having this I'm using a structure defined in function.h, I'm a > little suspicious about how I use this structure, I do some cast ( > (*_mc)) but I'm not sure that's well written 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.) But I guess all this is pretty off-topic for this list. Peter. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo