Circular includes
Patrik Fimml <[email protected]> Sat, 28 Apr 2007 17:22:00 +0200
| Newsgroups | gmane.comp.gnome.devtools.gob.general |
|---|---|
| Message-ID | <1177773720.4184.26.camel@localhost> |
This is a multi-part message in MIME format. [email protected] Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-NsIJVomwdhZANh03sGlM" --=-NsIJVomwdhZANh03sGlM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, I just discovered gob as a great thing hopefully simplifying my GObject programming a lot. There's just one thing that seems awkward to me: the __TYPEDEF_*__ approach to circular type dependencies. In hand-written classes, I usually just put the typedefs before the includes=E2=80=94e.g. instead of <begin %h code> #include "another-class.h" <end %h code> =20 [...] =20 #ifndef __TYPEDEF_A_CLASS__ #define __TYPEDEF_A_CLASS__ typedef struct _aClass aClass; #endif I would suggest typedef struct _aClass aClass; =20 <begin %h code> #include "another-class.h" <end %h code> =20 and circular includes would resolve comfortably. Is there a reason why gob2 doesn't do it like that? Kind regards, Patrik --=-NsIJVomwdhZANh03sGlM Content-Type: application/pgp-signature; name=signature.asc Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGM2aYaGpbNtVf2D0RApoSAJ9JWt21ty5FzZaLrDuA/wpSL8FH2wCg1aJY o0JTD/0VtiTtxBRqywQi8f0= =y089 -----END PGP SIGNATURE----- --=-NsIJVomwdhZANh03sGlM-- [email protected] Content-Type: text/plain; charset=us-ascii; name="footer" Content-Transfer-Encoding: 8bit -- to unsubscribe: send mail to [email protected] with "unsubscribe gob-list" in the subject [email protected]