Re: Fix for compilation error
Tony Graham <[email protected]> Fri, 09 Sep 2005 12:13:09 +0100
| Newsgroups | gmane.text.xml.xmlroff.general |
|---|---|
| Message-ID | <[email protected]> |
Tony Graham <[email protected]> writes: > Aron Stansvik <[email protected]> writes: ... >> I was getting: >> >> fo-image.c: In function `fo_image_get_width': >> fo-image.c:247: error: assignment of read-only member `width' >> fo-image.c: In function `fo_image_get_height': >> fo-image.c:270: error: assignment of read-only member `height' >> >> In this newly added file. I fixed by removing the const constrain on >> the passed in FoImage (patches attached), don't know if that is the >> right thing to do (I'm not such a proficient programmer), but it fixed >> the compilation error. Maybe the real solution to this is to not >> declare the width and height members the way they are declared? The >> funky GObject macros confused my little head. Heh. ... > It is unlikely that an FoImage will be created for which fo_image_get_width() > and fo_image_get_height() will never be called, so it's probably best to > create the FoDatatypes when the image is created. Done. Regards, Tony. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf